Question: Computer science QUESTION 9 Public Class Employee { public static int y: Private int age: Public Employee(){ age=0;} public int get_age() { return age;} }
Computer science 
QUESTION 9 Public Class Employee { public static int y: Private int age: Public Employee(){ age=0;} public int get_age() { return age;} } Public Class Test{ public static void main(String[] args) { Employee q = new Employee(); q.y=2; Employee.y=10; System.out.println("y=" + q.y); } } a. What is the output of the following code? b. Insert a System.out.println() statement that prints out q's age
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
