So, y is not a reference variable? It doesn't have an address for an object? Seems like the normal variables. If you excute my code you will see my point.
Type: Posts; User: magDreameR
So, y is not a reference variable? It doesn't have an address for an object? Seems like the normal variables. If you excute my code you will see my point.
Cornix: I have two classes in my code.
--- Update ---
My code has no error. Please, understand my point. y and z are both references to objects but I can only print one of them.
y is supposed to be an address that refers to a String object, why cannot I print it out like I did to z?
Is there a difference between objects of built - in classes and the other objects?
How could I get the String "mummy" again after changing the reference variable?
Check out this code:
class cat1 {
int x;
}
class tot {
Thanks.
I have read that the contents of a String object are immutable, but I could change them as I wish, check this out:
class a {
public static void main (String args []) {
String x=...
Thanks a lot to all of you
--- Update ---
I just thought that the j variable of for, would has been put directly in the generator method, it seems that it must be put into the instance variable...
Hi
It is in Java.
class fd {
int x;
void generator (int i){ fd o=new fd (i);}
}
class ibj2 {