- Joined
- Jul 21, 2010
- Messages
- 2
- Reaction score
- 0
Can any one please tell why I am getting a Null Pointer Exception for this particular code? And also how I can make it work?
It's a constructor.
public puzzle(int number_of_disks, int pause_time) {
disks = number_of_disks;
time = pause_time;
source = new LinkedStack();
for(int i=disks; i>0; i--){
source.push(i);
}
}
Thanks
It's a constructor.
public puzzle(int number_of_disks, int pause_time) {
disks = number_of_disks;
time = pause_time;
source = new LinkedStack();
for(int i=disks; i>0; i--){
source.push(i);
}
}
Thanks