There are many ways to compare the empty string in java and a usual approach is use below code
Well, don't do this ever in future. It cost your very high. See the analysis in given link in my another blog.
http://howtodoinjava.com/2013/03/31/always-use-length-instead-of-equals-to-check-empty-string-in-java/
String str = "";
if(str.equals(""))
{
//do something
}else{
//do else
}
Well, don't do this ever in future. It cost your very high. See the analysis in given link in my another blog.
http://howtodoinjava.com/2013/03/31/always-use-length-instead-of-equals-to-check-empty-string-in-java/