Question: Consider the following Java class code: public class Test { } private static int testCount = 0; public Test() { } testCount++; public static
Consider the following Java class code: public class Test { } private static int testCount = 0; public Test() { } testCount++; public static int getTestCount() { T return testCount; } What value would be output by the execution of the following code? Test t1 = new Test(); Test t2 = new Test(); Test t3 = new Test(); System.out.println(Test.getTestCount());
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
