Java Tutorial

Abstract Class in Java with Purpose and Real Time Example

Learn the abstract class in Java with crystal clear definition, purpose with real time example, code, uses and important points. Abstract Class in Java The abstract class is designed to contain both the defined and abstract methods. This class may contain only defined methods OR only abstract methods OR both. NOTE: Recommend reading first, the […]

Java: Abstract method in Easy Way with Real-Time Examples

Learn the abstract method in Java, clear definition, Where to Use and why to use in a program with super simple real-time examples. What is an Abstract method in Java? A method that has only a declaration and no implementation (no body) is known as an abstract method. The keyword “abstract” is used in a […]

Static Block in Java

Learn Static Block in java programming with example. A class can have a Static block, where we perform some operations or write some statements, if we want them to call before calling constructor of the class. Here is the static block defined in the class X. Just write the keyword static and put braces {} […]

Static method in Java

Learn static method in java with example i.e. how to write static method in a class and why do we use static methods in application. STATIC METHOD Before explanation, see how we make a method static in a class. It’s simple, just write static keyword before the method. “Call Static methods of a class using […]

Static Variable in Java

Learn Static variables in java with example and how it is different than non-static variables of a class in java programming. For better understanding, we will use static and non static (instance variables) both in example. Static Variables A static variable is shared by all objects of the class. Meaning, static variable has only copy […]

Final Method in Java

Learn final method in java with example and explanation. In a class, we make a method final so that no child class can override and implement it. NOTE: If a class is having final method, it does not mean that the class is also a final class. Purpose of final method is only that it […]

Scroll to top