java global variable in method code example
Example 1: global variable in java
public class Example {
public static int a;
public static int b;
}
Example 2: how to declare a public variable in java
public class Example {
public static int a;
public static int b;
}