• Post Reply Bookmark Topic Watch Topic
  • New Topic

Node Access Levels  RSS feed

 
Devin Henderson
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all.

I have a new lab assignment and I am trying to get a head start. One of the first requirements of the application is the following:

Constructor:

Instantiate a header node and make all three instance variables reference it. Also, set the info field and the next field of the head node to null.


Per the code that had been give to us, this is what I have thus far:


In the constructor, I am unable to create a new node as it says the class is not defined. I thought it was defined above?

Any help would be appreciated!

Thanks!
 
Devin Henderson
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right now, when I run this code with the DAT file provided by the instructor, I get a ClassNotFound Exception for the first line in the constructor that instantiates the new node.

Any ideas?
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

That sort of Exception often means there is a .class file missing.
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is your List class abstract? Why are you using the same class name as a well-known class in the Java API?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!