Abstraction in java example | RealTime achive program

Abstraction is one of the major features of Object-Oriented Programming. Abstraction in Java used to show only essential details to the user. Menas hiding an unnecessary internal functionality with users. For example, Smart mobile applications only show user applications and useful functions like in Youtube watch videos. Youtube does not show to use how internally Read More…


Java abstract method example | Use non-abstract class

A Java method without a body statement means the only declaration and does not have an implementation called a Java abstract method. The abstract method must start to be used as an Abstract keyword. An Abstract method can use only in the Abstract class. Syntax A simple syntax (signature) of Abstract method. abstract void methodName(); Read More…


Java abstract class | Examples, constructor, default method

What is Abstract Class in java? In a java class is declared with Abstract Keyword called a “Java Abstract Class“. An abstract class can have Abstract methods and no abstract method or both. This class can’t be instantiated, it should be extended and its method implemented. A point of Java abstract class Abstraction is one of the Read More…


Java Encapsulation | Definition, Advantages with Examples

Encapsulation Definition: Encapsulation is one of the pillar concepts of Object-oriented programming.  The Java Encapsulation mechanism does wrapping the data (variables) and methods together in a single unit. Where the variables of a class are hidden from other classes and can be accessed only through the methods (Getter – Setter) of their current class. This is Read More…


Java Polymorphism | Definition | Types | Examples

What is the Java polymorphism definition? Polymorphism Means a Many-form, It derived from 2 Greek words: The first word “poly” means many and another “morphs” means forms. So with using Java polymorphism can do on an object in many forms. Polymorphism possible when classes are related to each other by is-a Relationship (Inheritance). Before starting first learn Read More…


Override Java | Method Overriding Java | Examples

If any class (subclass) has the same methods as its parent class then it’s called a Method Overriding Java. In subclass(child class) override methods are shown with @override Java annotation. Methods overriding is also called runtime polymorphism in Java. It’s achieved by an Inheritance a one of Object-Oriented Programming (OOps) concept. In this tutorial, you will learn Read More…


Java Overloading | Method overloading | Examples

Java Overloading is defining two or more methods with the same name. But Method overloading in Java has the same name with a different number of parameters, different types of parameters, or both.  Methods overloading comes under the Polymorphism OOPs Concept. And it’s also called compile-time (or static) polymorphism. Syntax The syntax of changing the number of arguments/parameters in Read More…


Java Constructor | Default | Class | Types with Examples

A Java Constructor is a method, it’s invoked when a new object of the class has created and memory allocated to the Object. It has the same name as a class name and looks similar to a method but without return any value (no return type). This is a java constructor definition. The main reason to use constructor is the Read More…


Java Methods | Types | Calling & Parameters Methods example

A Java Methods or Function is a group of the statement, which performs a particular operation. You can also call it’s a piece of code with its own functionally, and make your application code more neat and clean. Don’t confuse with methods and Functions, both are the same. The different-different programming language used a different name for it. Read More…


Java Class | Declaration | Types | Constructor | Example

What is the Java Class?  Java Class is a blueprint (template or prototype) for any object or instance. The class has a group of common properties, methods, blocks, nested classes, etc, which are common for any object. A Class and objects are Object Oriented Programming  (OOP) concepts.  Java supports all OOP concepts because it is Read More…