I1.I hope m and n are using pass by values uses pass by values.
Instead try using pass 2.Instead use Pass by reference for doing soReference.To do Pass by Reference in javaJava, it has to be object in which case instead of declaring it as integer variablea Java Object. make it integer:
m= new Integer();3.So create new Integer object m=new Integer();.