This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Need Help with a program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Need Help with a program " Watch "Need Help with a program " New topic
Author

Need Help with a program

Jere Johnson
Greenhorn

Joined: Mar 29, 2003
Posts: 28
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 ]

Diapers are the best invention
Herb Schildt
Author
Ranch Hand

Joined: Oct 01, 2003
Posts: 239
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 ]

For my latest books on Java, including my Java Programming Cookbook, see HerbSchildt.com
Jere Johnson
Greenhorn

Joined: Mar 29, 2003
Posts: 28
Thank you for your help. That worked!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Help with a program