I am new to java and I am trying to understand the sequence in which JVM works.I have following queries.
1)Can a class be loaded at run time.
2)Can static variables be allocated memory during runtime.
3)Why static variables cannot be defined inside a function in java?
May be if you can explain me with the help of an example given below:
public class Test{
public static void main(String[] args)throws IOException {
static int d;
}
}
In this example static is written inside a method which will give an error.It would be helpful if you can explain this with above context.