|
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();
|