• Post Reply Bookmark Topic Watch Topic
  • New Topic

Method is undefined  RSS feed

 
Adam Chalkley
Ranch Hand
Posts: 518
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok so first of all I'm working on some code to add items to a list and I know the code is terrible but I'm trying my best at the moment

but i am getting method is undefined it worked up until a certain point then all of a sudden it is telling me that the method printList and getList in basket are undefined

anyone know why?




 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  i am getting method is undefined

Please copy the full text of the error message and paste it here. It has important info about the error.
 
Randall Twede
Ranch Hand
Posts: 4696
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this probably wont help, but i don't use static methods much(at all)
 
Adam Chalkley
Ranch Hand
Posts: 518
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys the program compiled fine and the errors went away once I compiled it was strange though that eclipse gave me two red x's beside basket.getList() and basket.printList(); saying method is undefined for the type basket
 
Knute Snortum
Sheriff
Posts: 4288
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May have been that you didn't save all the Classes involved.
 
Knute Snortum
Sheriff
Posts: 4288
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Adam, can I suggest that you do a little more work before you post?  Always post the full error code.  If you work in eclipse you may have to compile at the command line to get this.  Describe the problem fully.  Describe exactly what happens.  Be sure you've tried everything you can think of before posting.
 
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!