Hello,
I know it's wrong to check for !=null, but can anyone tell me the correct to handle this error.
The method getDaysToExpiration() returns an int
here I have ...
String tempDate = "";
if(aUser.getDaysToExpiration() !=null) tempDate = aUser.getDaysToExpiration().trim();
Generated servlet error:
D:\Tomcat\work\Standalone\localhost\WI\maintainUser$jsp.java:257: Incompatible type for int. Can't convert int to null.
if(aUser.getDaysToExpiration() !=null) tempDate = aUser.getDaysToExpiration().trim();
many thanks
I know it's wrong to check for !=null, but can anyone tell me the correct to handle this error.
The method getDaysToExpiration() returns an int
here I have ...
String tempDate = "";
if(aUser.getDaysToExpiration() !=null) tempDate = aUser.getDaysToExpiration().trim();
Generated servlet error:
D:\Tomcat\work\Standalone\localhost\WI\maintainUser$jsp.java:257: Incompatible type for int. Can't convert int to null.
if(aUser.getDaysToExpiration() !=null) tempDate = aUser.getDaysToExpiration().trim();
many thanks