Question: What is wrong with this code: public class A { { System.out.println(i); } int i = 10; } O A) Nothing, the code will run

 What is wrong with this code: public class A { {

What is wrong with this code: public class A { { System.out.println(i); } int i = 10; } O A) Nothing, the code will run properly. O B) Invalid use of a static initialization block. OC) Use of a field before it is defined. O D) Use of a method before it is defined

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!