When a global variable is declared and initialized with a value, then while creating object of the class, is the global variable again gets initialized and gets a new memory?
class A{
int a = 10;
}
This will gets stored in the memory address a with value 10. But when I create object of the class A, then is the a gets initialized again?
class A{
int a = 10;
public static void main(String args[]){
A a = new A();
}