Access Modifiers

Access Modifiers : Specifies the accessibility of members of a class (attributes /methods/constructors) based on the access modifier we can restrict the member’s accessibility, we can decide where and all these members can be accessible to use it. Java provides 4 types of Access Modifiers 1) private 2) default 3) protected 4) public Non Access […]

Share this article on

Interfaces in Java

Interfaces It is one of the ways to achieve abstraction in Java. It will have only method declaration(abstract methods) and constant attributes in it. It cannot be instantiated like how we can’t instantiate abstract class. They are used to achieve multiple inheritance and polymorphism. Java interface Example public interface Hello{ String str = ”hello”; void […]

Share this article on
< Previous Next >