Java enum is a special type of class that we can use to represent constant variables.
Usually, we can write a constant value by using a final keyword.

package enumexamples;public class EnumExamples
public static void main(String[] args) {
final String ANIMAL = "dog";
//output ->…

In this article, I am going to discuss OOP concepts with real-world examples. First of all, let's see what is OOP?

What is OOP?

OOP - Object-Oriented Programming is a programming paradigm that is based on objects. (Objects - real-world entities like book, vehicle, tree, etc..)

Now let's see what are OOP concepts.

J Riyana

I am an undergraduate in the Faculty of Information Technology University of Moratuwa, Sri Lanka.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store