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