basic

Java CompletableFuture

What is Java CompletableFuture? Java CompletableFuture is used when you have a task that needs to be run asynchronously and you want to wait for the task to complete and obtain a value OR to force a task to complete. It also allows chaining multiple tasks together or executing a task after a few other […]

Java Method Overloading and Conditions.

What is Java Method Overloading Java method Overloading is a feature where two methods in a class can have the same name provided they have different parameter lists. So if you have a class called ClassA, it can have two methods both named methodA, however, the two methods should take in different parameters. for example, […]

What is Inheritance in Java

What is Inheritance in Java? Inheritance In java is a feature that allows a class to extend the functionality of another class by directly deriving from it. The derived class has access to all the public and protected variables and methods of the base class. Inheritance allows adding functionalities over and above those defined in […]

What is Abstraction in Java?

What is Abstraction in Object Oriented Programming? Abstraction in java is used to hide the complexity of a system by exposing the method signature of the system but concealing its implementation. Java implements abstraction using interface and abstract class and so it would be easier to explain abstraction by explaining what interfaces and abstract classes […]

What is Object Oriented Programming?

What is Object Oriented Programming (OOP)? Object Oriented programming is a programming paradigm wherein all information is stored within the object and all ‘actions’ are performed by the objects. In the first tutorial, we explained the concept of Objects and classes. We defined “class” as a template that stores information about the state(customer’s name, address […]

Polymorphism in Java

What is polymorphism in Java? Polymorphism in Java is the principle by which an object can have multiple forms but each form conforms to a contract. Polymorphism can be thought of as a direct consequence of abstraction. In the earlier section, we say how abstraction separates method definition from its implementation. When we have two […]

Access Modifiers in Java

What are the Access Modifiers in Java? Access Modifiers in Java control access to classes, methods, and variables. There are four basic access modifiers and they are public, protected, private and no modifier (Default). We will use the word default instead of no modifier for the rest of the tutorial. Here’s a summary of the […]

Using Imports in Java and importing packages

What does the import statement in java do? In an earlier tutorial we saw an introduction to java. In this tutorial, we will look at using imports in java. To state it plainly – import statements allows us to use the name of the class in our code instead of its fully qualified name. What […]

Introduction to Java Packages

This tutorial provides an introduction to java packages and explains their features and benefits. What are Java Packages? Java packages are a way to logically and physically organize your code. Think of packages as a hierarchical folder structure within which you place your file. Let’s start with an example. In this example, we create a […]

Scroll to top
Bitnami