does anyone know how to replace variable value after a program that changes it? I tried static variable before, but it doesn't save after you close the program.
For example
import java.lang.Math;
public class Main {
static int A1;
public static void main (String [] args) {
A1=(int) (1+Math.random()*10);
}
}
Let's say the first time the program is run, A1 holds a value of 5. Is it possible that next time the program is run, A1 still holds a value of 5 instead of zero? (before reaching the main method)
Thanks