in case of objects of a class or structure ,,
we pass name of class which is "reference" .
i am not able to make changes simply in 2 or more variables.
---------- Post updated at 01:49 AM ---------- Previous update was at 01:45 AM ----------
//here is code--
public class ParameterPass {
public static void main(String[] args) {
///int i = 0; //statement1
i= addTwo(i++);
addTwo(i++);
System.out.println(i);
}
static int addTwo(int i) {
i += 2;
///return i; //statement 2
}
}
had to use these 2 statements to bring change in i.
still can change i. but what , if there r more variables ,,
i wanna change ?..