Amie Mac wrote:
So, that's what I'm confused about. Is it possible to put in the variable names as the parameters?
Such as:
Although, I've tried this and get compiler errors...
Amie Mac wrote:
I would edit line 16 in the Payroll.java file to read this:
Amie Mac wrote:
I would do this because I don't want to put actual values in the employee instance because I want to get them from the user input.
Travis Roberts wrote:
If the main driver class was longer, am I right to assume that the anonymous class on line 4 becomes eligible for garbage collection starting on the next line, line 5?
Travis Roberts wrote:
Also, I am uncertain as to why the toString method prints anything at all since it was not called? I tested by adding another method below that one which returns an integer
C C Campbell wrote:
for (int i= 0; i<= grades [i]; ++i)
Charles Todd wrote:Putting the suggested \n in my print statement in the for loop isn't an option because i'll get:
E
B
O
which isn't desirable so I'll have to insert somewhere else later in my code. Thanks everyone for help.
Louis Lewis wrote:As a question for Joel though, what would it look like if I didn't want my chessboard class to extend JPanel, and I instead wanted to create a JPanel inside it? I tried this briefly -- ChessBoard didn't extend anything, but I created a JPanel within it, but then when I tried to instancize it in my main GUI class, I got an illegal argument exception (presumably because it didn't extend anything, but I'm not sure how to fix this)