Question: A+ Computer Science OOP Worksheet 1 DIRECTIONS : Fill in each blank with the correct answer/output. Assume each statement happens in order and that one
A+ Computer Science OOP Worksheet 1
DIRECTIONS : Fill in each blank with the correct answer/output. Assume each statement happens in order and that one statement may affect the next statement. Some sections might print more than once.
|
class A{ private int x;
public A(){ x=0; } }
class B{ private int x;
public B(){ x=0; } public String toString(){ return ""+x; } }
class C{ private int x;
public C(){ x=0; } public C(int num){ x=num; } public String toString(){ return ""+x; } }
////////////////////////////////////////// //runner code in the main of another class A test = new A(); out.println(test);
B runner = new B(); out.println(runner);
C tester = new C(56); out.println(tester);
|
1. _______________
2. _______________
3. _______________
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
