Please ignore formatting and sentence related issues.
class ABC
{
public void change(Boolean x, Boolean y, StringBuffer s)
{
x=true;
y=true;
s.append("vinay");
}
public static void main(String a[])
{
Boolean x = false;
Boolean y = false;
x=false;
y=false;
StringBuffer s = new StringBuffer();
s.append("jasi");
ABC p= new ABC();
p.change(x,y,s);
System.out.println(x);
System.out.println(y);
System.out.println(s);
}
}
i want to get all changes which i made in change() method in main() method for Boolean x,y as we are getting s modified in main function. Is there any way by which we can get modified value in main method.