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 Unable to add object to array. 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 "Unable to add object to array." Watch "Unable to add object to array." New topic
Author

Unable to add object to array.

Edward Strife
Greenhorn

Joined: Mar 15, 2012
Posts: 14
When trying to add person to my list I get the cannot find symbol.



My sorted list class:




My initial list class:

E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
I don't see a method called add in your list class.
Did you want to call the method called insert instead?
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4425
    
    8

It's a really bad idea to name your classes after classes in the standard Java libraries - expecially ones that are commonly used. It just leads to confusion. So don't call your own class List. If you want to implement java.util.List, do that. If you don't, use a different name.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to add object to array.