Search:

Type: Posts; User: magDreameR

Search: Search took 0.06 seconds.

  1. Re: Java has a default constructer, so why there is a mistake at

    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.
  2. Re: Java has a default constructer, so why there is a mistake at

    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.
  3. Re: Java has a default constructer, so why there is a mistake at

    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?
  4. Re: Java has a default constructer, so why there is a mistake at

    How could I get the String "mummy" again after changing the reference variable?

    Check out this code:


    class cat1 {
    int x;
    }

    class tot {
  5. Re: Java has a default constructer, so why there is a mistake at

    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=...
  6. Re: Java has a default constructer, so why there is a mistake at

    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...
  7. Java has a default constructer, so why there is a mistake at

    Hi

    It is in Java.

    class fd {
    int x;
    void generator (int i){ fd o=new fd (i);}
    }

    class ibj2 {
Results 1 to 7 of 7