If you really, absolutely, positively, definitely, surely, urgently need global variables
you can have them in Java:
-
public class Globals {
-
-
// all your 'globals' here:
-
static int foo;
-
static double bar;
-
static String baz;
-
}
-
Because all of the variables are static and public you can access/modify them
in any other class and method:
-
class AnotherClass {
-
final static double pi= Global.bar;
-
final int buz= Global.foo;
-
String myBaz;
-
public AnotherClass(String baz) { Global.baz= myBaz= baz; }
-
}
-
I consider coding like this as Basic and Fortran coding *yeach*
kind regards.
Jos