Given the declaration
public class MyClass{ private int x; public void print() { System.out.println(“x = ” + x); } private void setX(int y) { x = y; }}MyClass myObject = new MyClass();The following statement is legal.
myObject.setX(10);
A) True
B) False
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
