Hi,
I will post the code and then make my question...
public class SampleClass{
String s1;
int a;
public static void main(String args[]){
String s2 = null;
//Some set of code where objects (including object of SampleClass) get created
}
}
In the above code, does memory get allocated for variables "s1" and "a" before any instance is created?
Even if instance is created, will the memory be created for the string and int before assigning some values to them?
Regards,
Sriram