At the end of my rope with some code

EyeMWing

Banned
Jun 13, 2003
15,670
1
0
Compiler spits out "Cannot reference non-static method add(java.lang.Object) from a static context"

Add in this case belongs to Java.util.ArrayList. I've used this in this context more times than I can count - in fact, I've used it like this since I learned to code. I just did it 2 hours ago and it worked fine.

And yes, I've tried moving list to a static variable and declaring it globally, but that did no good.
 

EyeMWing

Banned
Jun 13, 2003
15,670
1
0
OH CRAP. I'M STUPID. God help my soul for making that godawful stupid mistake.

That means I figured it out, by the way.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Good thing you figured it out! I was about to blast you for such stupidity :p
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Wait, give him a chance to prove his point. If he can write the same code in QBasic in fewer lines then we shall let him stay!!
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
btw, and sorry for the off-topic hijack, amdfanboy, you did you get the rollover text in your sig?

and htf did you get a user rating of 413968959?