Does the code j=i mean that the value of i is passed into j or the reference?Code:int i=5; int j=0; System.out.println("int i is: " +i); System.out.println("int j is: " +j); j=i; System.out.println("int j is: " +j);
I'm always confused with pass by reference and value.
What is want to do is to pass the value 5 into j, yet when i code j==i and compile it, it says the line is not a statement. Can't compile..


Reply With Quote



Bookmarks