Question: ` ` ` public class MyClass { private static int count = 0 ; private int id; public MyClass ( ) { count + +
public class MyClass
private static int count ;
private int id;
public MyClass
count;
id count;
public static int getCount
return count;
public int gelld
return id;
public static void mainString args
MyClass obj new MyClass;
MyClass obj new MyClass;
System.out.printInobjgetld;
System.out.printInobjgetld;
System.out.printInMyClassgetCount;
What will be the output of the abowe Java program?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
