<p>That’s funny. Thanks both of you. You’re right about private, I thought that it meant that only methods of the same instance of a class could modify.</p>
<p>
class TheClassCaller {
public static void main(String[] args) {
TheClass classA = new TheClass(4);
TheClass classB = new TheClass(5);
classB.setOtherValue(classA, 10);
System.out.println(classA.getValue());
}
}</p>
<p>class TheClass {
private int value;</p>
<pre><code>public TheClass(int aValue) {
value = aValue;
}
public void setOtherValue(TheClass a, int num) {
a.value = num;
}
public int getValue() {
return value;
}
</code></pre>
<p>}
Returns 10. So the problem is possible just requires pretty ugly programming practices that I was unaware were allowed. Greatly appreciated.</p>