Question: 1.Given the following code fragment: int x=10; static int y=20; public void m11) System.out.println (x+y); public static void m2(){ System.out.println (x+y); } A. method m1

 1.Given the following code fragment: int x=10; static int y=20; public

1.Given the following code fragment: int x=10; static int y=20; public void m11) System.out.println (x+y); public static void m2(){ System.out.println (x+y); \} A. method m1 can't access variable x B. method ml can't access variable y C. method m2 can't access variable x D. method m2 can't access variable y

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!