Question: what is the output? Suppose that the Candy class below is defined in Candy.java. public class Candy { public int x; public static String s;
what is the output?
Suppose that the Candy class below is defined in Candy.java. public class Candy { public int x; public static String s; public void method10) public static void method20 An instance of Candy (named twix) is initialized with: Candy twix = new Candy(); Which of the following statements is/are making use of proper OOP syntax? System.out.println(twix.x); twix.method 10; twix.method2(); System.out.println(Candy.x)
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
