View Single Post
Old 04-19-2004, 06:52 AM   #5 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,161
Belisarius is on a distinguished road
On the subject of best practices, you might want to check to make sure whatever you're using equals with isn't null, or else a NullPointerException will get thrown.

The way I usually tackle the problem is

if(input == null){
input = "";
}
return input.trim();
__________________
GitS
Belisarius is offline   Reply With Quote