Question: What statement about the following interface is correct? A. Line 2 does not compile. B. Line 3 does not compile. C. Line 4 does not

What statement about the following interface is correct? 

1: public interface Thunderstorm { float rain = 1; 2: 3: 4:

A. Line 2 does not compile.

B. Line 3 does not compile.

C. Line 4 does not compile.

D. Line 5 does not compile.

E. Line 6 does not compile.

F. Line 7 does not compile.

G. All of the lines compile.

1: public interface Thunderstorm { float rain = 1; 2: 3: 4: 5: 6: 7: 8: } char getSeason () { return 'W'; } boolean isWet(); private static void hail() {} default String location () { return "Home"; } private static int getTemp () { return 35; }

Step by Step Solution

3.34 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image contains a code snippet for an interface named Thunderstorm in Java Lets go through each l... View full answer

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 Oracle Questions!