I made 2 classes one is :
public class JavaApplication5 {
public static void main(String[] args) {
int y=0;
cats catobject = new cats();
catobject.ma(y);
System.out.println(y);
}
}
the other is :
class cats {
public void ma(int x){
x=x+9;
}
}
it's supposed to print out 9 since the method ma should have added 9 to the integer y , but instead it prints out 0. why?