Question: Fill in the blank with the correct annotation usage that allows the code to compile. A. @CelestialBody(name=Venus) B. @CelestialBody(name=Pluto, size=2, lightYears=5) C. @CelestialBody(lightYears=10) D. @CelestialBody(Jupiter)

Fill in the blank with the correct annotation usage that allows the code to compile. 

public interface Celestial Body { String name(); double size() default 100; int

A. @CelestialBody(name="Venus")

B. @CelestialBody(name="Pluto", size=2, lightYears=5)

C. @CelestialBody(lightYears=10)

D. @CelestialBody("Jupiter")

E. @CelestialBody(size=3)

F. None of the above.

public interface Celestial Body { String name(); double size() default 100; int lightYears = 2; } class Planet {}

Step by Step Solution

3.46 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The provided image shows an annotation interface in Java named CelestialBody with three elements nam... 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!