Category Java

Polymorphism in Java: Types, Example

Polymorphism in Java

Polymorphism in Java is one of the core concepts of object-oriented programming language (OOPs). The word polymorphism is derived from two Greek words: poly and morphs. The word “poly” implies many and “morphs” means forms. Therefore, polymorphism means “many forms”.…

Encapsulation in Java (with Realtime Example)

Realtime example of encapsulation in Java

The process of binding data and corresponding methods (behavior) together into a single unit is called encapsulation in Java. In other words, encapsulation is a programming technique that binds the class members (variables and methods) together and prevents them from…

Getter and Setter in Java

In this tutorial, we will learn about getter and setter methods in Java, their use cases, and how to implement them with the help of various example programs. Getter Method in Java A method which is used to retrieve/get the…

OOPs Concepts in Java (with Examples)

OOPs concepts in Java

In this tutorial, we will understand about a very important topic “OOPs concepts in Java” with examples. We will also know about its striking features, advantages, and applications. So, let’s understand first what is object-oriented programming (OOP) in Java. Object-oriented…

Final Keyword in Java | Use, Example

Use of final keyword in Java

In this tutorial, we will learn about final keyword in Java through various examples. We will discuss three places such as variable, method, and class where the final keyword can be used. The final keyword declared with variable, method, and…