Originally posted by Griff James:
Thanks Martin, I thought no-one would reply!
I'll try these out when I get home tonight.
For now it's back to the Lloyds Law Reports and the joy of Maritime Law, until maybe, just maybe, I can escape to a shiny new career in IT!!
Originally posted by Cindy Glass:
It is not important that the public static variables be declared at the end of your class instead of at the beginning. what IS important is that they are declared OUTSIDE of the main method.
If you look where they are at the end, the are placed after the main method closed. Where they are at the top is inside the main method. That makes the variables local to the main method and they cannot be public static (however they could be final).
Local variables belong to the method or block that they are declared in, not the instance and not the class (static).
If you move the statements BEFORE the main declaration it will work.
Originally posted by Val Dra:
1) Local declaration of variables do not use keywords such as private , public,static or protected.SO if you left them in your main method you would have to take these keywords out.
2) this depends a lot on a hardware ,the faster the cpu better results.