As of JDK 5, you can get NullPointerExceptions on weird places, such as

Map<String, Integer> lookupTable = new HashMap<String, Integer>();
int value = lookupTable.get("key");

Since there are no entries in the lookupTable, the get returns a null value. The unboxing of a null value throws a NullPointerException.

Explain your role on the most recent project or the most challenging project.

Follow-up questions on your project.

Explain how lazy-loading works?

Explain the transaction commit and rollback mechanism utilized in your project.

Give examples of design patterns involved in your project.

Explain Unit of Work pattern

Explain Strategy pattern

How would you remove or refactor boiler-plate code?

How would you wrap boiler-plate try and catch block around your code?

Explain strong references and weak references.

Explain tomcat class loader.

And finally: Joshua Bloch, Cedric Beust, Crazy Bob and all the other java big names work at Google 

Interesting Names

June 14, 2006

I heard the name John D'Earth on PBS tonight, made me think of a variation on that name, John D'Eath

Most fascinating aspect of being an American. The disbelief I felt when I read what the commander at Guantánamo had to say about the 3 suicides at Guantánamo has been tempered by these 5 letters to The New York Times.

 

June 13, 2006

To the Editor:

Re "Three Prisoners Commit Suicide at Guantánamo" (front page, June 11):

Amnesty International, Human Rights Watch and the United Nations have all denounced the conditions of the United States military prison at Guantánamo Bay, Cuba, and even Prime Minister Tony Blair, the Bush administration's single major ally in the war on terror, has called for its closing.

Yet Rear Adm. Harry B. Harris Jr., the commander at Guantánamo, chooses to interpret the suicides of three prisoners by saying:

"They have no regard for life, neither ours nor their own. I believe this was not an act of desperation, but an act of asymmetrical warfare waged against us."

Though I no longer thought it possible, such language makes me ashamed of my own government.

Stephen Crowley
Cleveland Heights, Ohio, June 11, 2006

•To the Editor:

The moral responsibility for the deaths of the three prisoners lies squarely with President Bush.

First, he decided to imprison them indefinitely without trial. Then he defied the Supreme Court's 2004 repudiation of his position and announced that he would insist on yet another ruling of the court before providing elementary fairness.

This obduracy has now had its long-predicted consequences, but the administration remains obstinate.

Having driven to suicide men in its custody whom it blocked from counsel and whom it unilaterally asserted were terrorists, it complains that it has been the victim of an act of war.

Actually, the Guantánamo Three were victims of the president's war on the rule of law.

Eric M. Freedman
New York, June 11, 2006
The writer serves as a legal consultant for the Guantánamo detainees.

•To the Editor:

As a federal court-appointed monitor of health care in prisons for more than 20 years, I have reviewed the medical records of prisoners who killed themselves in prisons and jails throughout the United States.

Prisoners kill themselves when they are hopeless, when they have no contact with their families, and when faced with a terrifying future.

Prisoners at Guantánamo are subject to torture and to cruel, inhuman and degrading punishment intended to drive men to madness, which leads to suicide.

For the sake of humanity, for the sake of the prisoners at Guantánamo and to divert our country from its course of infamy, the prison at Guantánamo must be closed immediately.

Robert L. Cohen, M.D.
New York, June 11, 2006
The writer, the medical director of Rikers Island Health Services from 1982 to 1985, is a federal court-appointed monitor of medical care for prisoners in Michigan, New York, and Connecticut.

•To the Editor:

You point out the inhumanity of Rear Adm. Harry B. Harris Jr.'s response to the Guantánamo suicides ("The Deaths at Gitmo," editorial, June 12). When I first read the admiral's remark — "this was not an act of desperation, but an act of asymmetrical warfare waged against us" — my body went numb. When I read your editorial, I began to sob.

A ruthless military is not the same as a strong military. Americans must condemn the former.

Kathy Rappaport
Santa Fe, N.M., June 12, 2006

•To the Editor:

Although the exact reason that three detainees at Guantánamo committed suicide is not known, it is clear that our government failed in its responsibility to safeguard prisoners under our custody.

It is important that the military take immediate measures to see that this tragedy cannot happen again.

It is also vital that the Guantánamo detainees have recourse to our courts so that they can be dealt with in a civilized fashion.

Harris L. Present
New York, June 12, 2006

Write a program to compute Fibonnaci sequence for a specified index.

Assume you have two tables: Artist (Artist_Id, Name) and Painting (Painting_Id, Title, Artisit_Id). Write a SQL statement to return all paintings by an artist. Write another SQL statement to return all artists who do not have a painting. (Hint: Left join)

When would you use delegation versus inheritance?

From the java.util package, explain when would you choose LinkedList over a Vector.

How to test the most significant bit of a number?

Explain how you would quickly solve the problem of determining which files contain phone numbers. Print out a list of filenames.