Question: 3. Write the output generated by the following class when it is run. (2 pts) public class Mystery private int my_opone; private int my_opTwo; public

3. Write the output generated by the following class when it is run. (2 pts) public class Mystery private int my_opone; private int my_opTwo; public Mystery (int opone, int opTwo) my_opone = opOne; my_opTwo - opTwo; public String toString() return my_opone + ", " + my_opTwo; public void doSomething ( ) Name (Print): my_opone = my_opone + 1; my_opTwo = my_opTwo - 1; public static void main(String[] args) Mystery aMystery = new Mystery ( 9, 3); System.out.println( aMystery.toString() ); aMystery.doSomething ( ); System.out.println( aMystery.toString() ); aMystery.doSomething ( ); System.out.println( aMystery.toString() )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
