Method in Java

Java Method is a collection of statements that are put together to perform some specific task. To run the methods, it should be called and it returns the value to the caller. Users can pass data to the methods and …

Read moreMethod in Java

Abstraction in Java

Data abstraction is the process of hiding the details but only displaying the relevant information to the users, which means hiding the implementation details and displaying only its functionalities. This is one of the main advantages of using abstraction. Abstraction …

Read moreAbstraction in Java

Java – Types of Inheritance

Java supports three types of inheritance on the basis of class: single, multilevel, and hierarchical. Whereas multiple and hybrid inheritance is supported through interface only. Types of Inheritance in Java: Single Inheritance Multilevel Inheritance. Hierarchical Inheritance. Multiple Inheritance. Hybrid Inheritance. 1. Single …

Read moreJava – Types of Inheritance

Java Encapsulation

Encapsulation is one of the four fundamental OOP concepts. Encapsulation in Java is defined as the wrapping up of data(variable) under a single unit. The use of Encapsulation is to make sure that implementation detail or we can say sensitive data is …

Read moreJava Encapsulation