| Author |
A return int method problem
|
Andrew Parker
Ranch Hand
Joined: Nov 12, 2001
Posts: 178
|
|
Hi, Here is the code: It throws Exception when I make it. Why yo.getSize() cannot return an int? Any idea? Thanks
|
 |
Andrew Parker
Ranch Hand
Joined: Nov 12, 2001
Posts: 178
|
|
|
sorry, it should be public int CardsUndrawn()
|
 |
Layne Lund
Ranch Hand
Joined: Dec 06, 2001
Posts: 3061
|
|
What exception is thrown exactly? I don't see anything wrong off the top of my head. Also, which line throws the exception? If you can give these details, then we can more easily help you find the solution to your problem. Layne
|
Java API Documentation
The Java Tutorial
|
 |
William Barnes
Ranch Hand
Joined: Mar 16, 2001
Posts: 965
|
|
Did you not post all the code? What is "header"? You constructor for LinkedListItr assumes that "theNode" is not null. Which in this case may be the case. Than when you test in "isListEnd()" you once again are not testing to ensure that "current" is not null, which I think may be your problem.
|
Please ignore post, I have no idea what I am talking about.
|
 |
 |
|
|
subject: A return int method problem
|
|
|