hallo,
If I have a class for example :
Class A{
int i;
public A(int myi){
i = myi;
}
}
and in my main class I can write:
A a1 = new A(1);//assigning a1.i = 1
a1 = new A(2); //assigning a1.i = 2
the question :
If I use the above method to change the value of i, is it wasting the computer memory?
Sincerely Yours,
Pujo Aji
If I have a class for example :
Class A{
int i;
public A(int myi){
i = myi;
}
}
and in my main class I can write:
A a1 = new A(1);//assigning a1.i = 1
a1 = new A(2); //assigning a1.i = 2
the question :
If I use the above method to change the value of i, is it wasting the computer memory?
Sincerely Yours,
Pujo Aji