create a global variable then set data inisde a method java code example
Example: java how to make a variable global
public class Example {
public static int a;
public static int b;
}
public class Example {
public static int a;
public static int b;
}