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: Raju Srinivas   on May 06

No, get(0) returns the first item in the list.

The problem is in your Elevator constructor. You never initialize
upList. You create a new local upList that gets destroyed when the
constructor returns.

Also, you do not have to cast theFloor when you add it to the list.

Share: