I know that memory allocated for functions and static
members is done only once, and that class variables are given new memory space each time a new object is created.
Once I use the new
operator in this following problem, I will get 8 bytes for the class variables. But, when is memory for int c
allocated? During compile time?
class A
{
int a,b;
void show()
{
int c;
}
public static void main(String...s)
{
new A().show();
}
}