Question: Suppose that the class A is defined as given below. Let a be an instance of A. Which of the following statements are incorrect?
Suppose that the class A is defined as given below. Let a be an instance of A. Which of the following statements are incorrect? public class A { int x; static String y; void xmethod() { } static void ymethod() { } } O A.ymethod(); O System.out.println(a.y); O A.xmethod(); B and C
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
The detailed answer for the above question is provided below The given code snippet appears to have ... View full answer
Get step-by-step solutions from verified subject matter experts
