-1

i'm always getting this exception while i'm running my code.

          if((UDID)!=null && action.equalsIgnoreCase("insert")){ // null pointer exception 
          int id = Integer.parseInt(UDID);
          UserBean user = new UserBean();
          user.setUserdetailid(id);
          user.setUserid(id);

NO_name
  • 3
  • 4

1 Answers1

0

Statement:

action.equalsIgnoreCase("insert")

will throw a nullpointerexception if action == null because you cannot call equalsIgnoreCase method on an unassigned variable.

Killer Death
  • 459
  • 2
  • 10