Java OOP Concepts

Java static Keyword(With Examples)

This post is about Java static keyword along with static methods, static variables, static class, and static blocks with the help of simple examples. Java static Keyword In Java, If we want to access class members without creating an instance of the class, we need to declare the class member with static keyword. In Java, …

Java static Keyword(With Examples)Read More »

Java Access Modifiers

This post is about Access/Visibility modifiers in Java and how to use them. Access Modifiers In Java, access modifiers are used to set the accessibility (visibility) of classes, constructors, data members and methods in another classes.  There are four types of access modifiers available in java: Default : visible only within the package. Private: visible …

Java Access ModifiersRead More »

Java Interfaces(with Examples)

This article is about interfaces and how to implement it in Java with the help of examples. Interface An interface in java is a collection of fields and abstract methods (only method signature, no body). Interfaces are by default prefix with abstract keyword, which means similar to abstract classes we cannot create an object of …

Java Interfaces(with Examples)Read More »

Java Abstract Class and Abstract Methods

In this tutorial, we will learn about Java abstract classes and methods and how to use them in our program with the help of examples. Abstract Class An abstract class is a class that cannot be instantiated (we cannot create objects of an abstract class). Syntax We use the abstract keyword to declare an abstract class. …

Java Abstract Class and Abstract MethodsRead More »

Java Constructor in Inheritance

In this article, you will learn about Constructor behavior in Inheritance, in Java with the help of examples. A Constructor is a member function of a class that allows you to initialize a newly created object of that class type with some initial value and has same name as class with no explicit return type. …

Java Constructor in InheritanceRead More »

Java Inheritance

In this tutorial, we will learn about inheritance in Java with the help of examples. Inheritance Java Inheritance is one of the key feature of OOP (Object Oriented Programming). Inheritance can be defined as the process where one class is allowed to inherit the features (fields and methods) of another class.  Inheritance supports the concept …

Java InheritanceRead More »

Java Class and Objects

In this article, you will be introduced with the basic OOPs concept i.e. Classes and Objects and how you can create classes and objects in your Java program. Java Objects Object refers to an entity that has state and behavior.  State: represents the data (properties) of an object. Behavior: represents the behavior (functionality) of an …

Java Class and ObjectsRead More »

%d bloggers like this: