The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Classes problem

Hey

I'm having a problem with classes and calling methods. I only know I have a problem at this point because Eclipse told me so. I've gone over it and over it and I just can't see what I did wrong here. Then again, I really don't know what I'm looking for. Here's the first class and call the the method in the second class. I'm trying to get an ArrayList<> I created passed into another method in a child class.

At this point, I'm not concerned about whether or not it actually does what it's supposed to do. I'm only concerned with why Eclipse says the call itself won't work. I'm doing something wrong, but I can't tell what. Thanks for any help given!

Re: Classes problem

Eclipse says the call itself won't work

And what does Eclipse say? Its usually very descriptive and leads to the problems, and since its not posted makes it difficult for us to pinpoint the issues. A brief look at the code: ArrayList's are objects, so you need to instantiate them (using new ArrayList() ). There also seem to be misuses of common functions (for example JFrame.add(String s) does not exist). Recommend you read the API's on the objects/functions you wish to use to familiarize yourself on how to use them