Am trying to change the value of an variable when it is passed as an argument to the function, but the original value remains the same, so is it possible to change?(i,e in the below code i want the value of x to be 11)
public class Runy {
public static void main(String [] args)
{
int x=10;
int y=change(x);
System.out.println(x);
System.out.println(y);
}
public static int change(int a)
{
a+=1;
return a;
}
}