aspose file tools
The moose likes Java in General and the fly likes why method isEmpty and isFull cannot be read?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "why method isEmpty and isFull cannot be read??" Watch "why method isEmpty and isFull cannot be read??" New topic
Author

why method isEmpty and isFull cannot be read??

faeq eyqa
Greenhorn

Joined: Apr 25, 2012
Posts: 1
i have make a coding of an arraylist..but when im compile it..it say that cannot find symbol isEmpty..can somebody tell me why..
here is my coding..


Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 8564

Welcome to the Ranch.
In your code, is isEmpty a method or a variable name? (Hint)
There are other problems with your code too, but we will come to that later


[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1430

Hi, welcome to JavaRanch
I've edited your post to add code tags to make it more readable, please take the time to read about code tags in our FAQ entry here: UseCodeTags.

Now, as for your problem, you've defined a method called isEmpty(), but you're not actually calling it anywhere in your code eventhough you intended to do so.
Look carefully at lines 33, 54 and 73. Those aren't valid method calls.

Edit: ugh, beaten by Maneesh while making a coffee-run ;)


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: why method isEmpty and isFull cannot be read??
 
Similar Threads
Stacks Need Help
Convert Queue Dequeue to Link list format
Comparable<T> - must override compareTo()???
Unable to add object to array.
Trouble with ADT lists