This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help with a program

 
Jere Johnson
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I get this program to compile , but my error message is the following when
i try to run the program.
Exception in thread "main" java.lang.NullPointerException
at SeqOfIntegers.insert(SeqOfIntegers.java:80)
at SeqOfIntegers.main(SeqOfIntegers.java:28)
Press any key to continue...


[ October 31, 2003: Message edited by: Jere Johnson ]
 
Herb Schildt
Author
Ranch Hand
Posts: 253
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jere:
In your code shown here:

You are assigning a reference to the new VectorSequence to a local reference named seq, not to the seq instance variable that you declared earlier. Try this instead:

[ October 31, 2003: Message edited by: Herb Schildt ]
 
Jere Johnson
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your help. That worked!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic