class TestPrivate {
private String s;
public TestPrivate () {
s = “Actual String”;
}
public void print() {
System.out.println("S is: "+s);
}
public void change(TestPrivate tp) {
tp.s = tp.s + ” Modified”;
}
public static void main (String args[]) {
TestPrivate s1 = new TestPrivate ();
TestPrivate s2 = new TestPrivate ();
s1.print();
s2.change(s1);
s1.print();
}
}