Какие определения интерфейса MyInterface являются корректными?
Explanation
All declared methods are public in intefaces, public keyword is optional. Abstract keyword is optional too. As they are applied by default, they are redundant and should not be explicitly declared.
Interface fields are constants and have to be initialized.
Interfaces can have method definitions but methods myst be declared with default keyword.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes