If public interface drink is public, and public class beer is public and boolean isAlcoholic is default, why do I have to change it to public when implementing it in beer class?
Andrei
Level 41
public vs default?
Resolved
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
26 November 2020, 15:12solution
The methods of interfaces are always public. When a class implements an interface it must implement all the interface's methods as public.
+3
Andrei
26 November 2020, 15:38
ah, ok, thank you!
0