how can isolve this problem in my balckberry
steps to solve java.nullpointe rexception
steps to solve java.nullpointe rexception
if(var1 != null && var1.length() > 0)
{
// use the variable
}
else
{
// handle the exception
}
try{
// use the variable var1
}catch(NullPointerException npe){
System.out.println(npe.getMessage()); // not production ready
}
Comment