Association in Java

What is Association in Java Association in java describes the relationship between two classes. It establishes relationships through their objects. An association may represent one-to-one, one-to-many, many-to-one, or many-to-many relationships. It enables the HAS-A relation between the classes. Let’s see different examples of these association relations below. A person can …

Read more

Aggregation in Java

Aggregation in Java allows us to provide a reference for one class within another class. In other words, it supports a one-way relationship and implements a HAS-A relation. This is in contrast to the java inheritance concept that supports IS-A relation. When two classes have a HAS-A relation, we say …

Read more

Super Keyword in Java

Super Keyword in Java is a reference variable that we use in inheritance to refer to the immediate parent class object from the child class. In this tutorial, we will discuss in detail about the different uses of the java super keyword. It is important that you must have knowledge …

Read more

Java Access Modifier

Java access modifier allows us to set the visibility or access rights for variables, methods, classes, and constructors. In general, there are 2 different types of access modifiers in Java. Access modifiers – controls the access level Non-access modifiers – does not control the access level but provides other functionalities. …

Read more

Java Break

We use Java break statement to exit or terminate from any of the loop execution based on a certain condition. We mainly use java break for loop control statements like for, while, and do-while loops. Another main usage is in java switch-case statement. Syntax In java, break is a keyword …

Read more

Do-While Loop in Java

Do-While Loop in Java is another type of loop control statement. Similar to while loop which we learned in the previous tutorial, the do-while loop also executes a block of code based on the condition. The only difference is that Do-While Loop in Java executes the code block at least …

Read more

Inheritance in Java

Inheritance in Java is one of the most important features of an Object-oriented programming system(OOPs). We have seen an overview of inheritance in the previous tutorial of OOPs concepts in Java. In this tutorial, we will understand in detail about inheritance in java and its type with various examples. What …

Read more

Java this Keyword

We use Java this keyword to refer to the current instance or variable in a method or a constructor. We can also call it as a reference variable. In this tutorial, we will understand how to use the java this keyword in various contexts. Usage of Java this keyword The …

Read more

Polymorphism in Java

Polymorphism in Java is another important feature of OOPs concept. We have seen an overview of polymorphism in the tutorial OOPs concepts in Java. In this tutorial, we will understand in detail about polymorphism and its different types. We will cover about Static Polymorphism, Dynamic Polymorphism, Runtime Polymorphism. What is …

Read more

Java Static Keyword

In Java, static is a keyword that we mainly use to manage memory. In this tutorial, we will discuss in detail how to use the static keyword in Java and its different purpose. We will also discuss about Java Static Class, Java Static Method, and Java Static Variables in this …

Read more

Translate ยป