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.
And here's the child class and relevent methods:package testP; import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.io.*; import java.util.*; public class Test extends JFrame implements ActionListener { private JButton enterQ, startTest, startOver, startTestOver, nextQuestion; private JPanel buttonPanel; private JTextArea showQuestions, showAnswers, showCAnswers; private JTextField enterQuestions, enterAnswers; public ArrayList<String> questions[], corAnswers[], uAnswers[]; public Test() { public void actionPerformed(ActionEvent e){ String command=e.getActionCommand(); if(command.equals("Enter Question")) { String newQuestion=enterQuestions.getText(); String newAnswer=enterAnswers.getText(); addQ(newQuestion); addA(newAnswer); } } }
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!