I just learned that it is better to use List here in the place of the ArrayList. I would have private List horror = new ArrayList(); When I do this, I get a compiler error for the the last 2 lines of code. After the List objects are instanstieated, they are filled with Strings and I want to get the size of the ArrayList after filling them.
Keith Lynn
Ranch Hand
Joined: Feb 07, 2005
Posts: 2341
posted
0
What is the error?
Jeff Albertson
Ranch Hand
Joined: Sep 16, 2005
Posts: 1780
posted
0
You should always post a minimal, complete example program demonstrating your problem. That way, forum members can simple copy, paste, compile and run your code. As it is know, you didn't even tell us the error! We are left guessing! And the few lines you posted, depending on where they occur in your code, may or may not generate syntax errors. Again, learn to be a good forum member and post short but complete code.
By the way, creating non-static fields like horror but copying its size to a static field size_horror smells bad. That looks like a mistake in the making...
There is no emoticon for what I am feeling!
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.