Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Navin Gada   on May 06 In Java Category.

  
Question Answered By: Rocco Anderson   on May 06

nowhere have you inserted floor 0 into upList,

anotherFloor = (Integer)upList.get(0);
firstElement = anotherFloor.intValue();

so anotherFloor will be null
and anotherFloor.intValue() will throw a null pointer exception
nothing strange here (except perhaps your expectation that it won't)

Share: