How to make the subclass int value to superside the final static int value in the main class? Example : My main class has
public class main {
final static int num = 2;
....
....
System.out.println(num);
}
My subclass is called in the main class.
Public class subclass {
.... -> How can I define the int num = 10 in the subclass without changing the main class code
...
}
The deal is not to touch the main class ie i cant change it as final static int num = 10; but i have to assign 10 to num.Do you know ?