final method in java

In Java, the final keyword is one of the most important concepts. Many programmers may have a lot of doubts in mind. I have heard many time common questions about the final keyword like How to make a final method? When to create a method final? What is the need to make a final method? … Read more

Final Keyword in Java

The final keyword in Java is a very important keyword that is used to apply some restrictions to the user. The final keyword can be applied to classes, methods, and variables in Java. In this article, we will see What is the final variable in java, the final method in java, and final class in java. … Read more

final variable in Java

The final variable is the most important concept in java. Most programmers may know about the final variable. Here we will discuss, What is final variable and final reference variable. How many ways to initialize it? Here is the table content of the article we will cover this topic. 1. What is the final variable … Read more

Java import package

You can access classes, interfaces, enumeration, or sub-packages from any package by using java import package statements. There is no need to import a class if it exists in the same package and we can directly access it. Classes in the same package find each other without any problem. But when class, interface, or enum … Read more

Package in java

The package in java is one of the most important features of Java. If you are learning Java, you need to understand the packages in java. Here we will describe what is the package in java, the steps to create the package in java with the example, the java package naming convention, the default package … Read more

Access modifiers in Java

Access modifiers in Java specify the scope of a class, constructor, method, or field. We can change the scope of fields, constructors, methods, and classes by applying the Access modifiers in Java. It is also known as access specifiers in java. In this post, we will read all the modifiers in java and access specifiers … Read more

Encapsulation in Java

Object-Oriented Programming is totally based on four major pillars Inheritance, Abstraction, Encapsulation, and Polymorphism. A professional java developer must have knowledge of these pillars. In this post, we will give you complete knowledge of one of the most important concepts of OOPs i.e. Encapsulation in Java. How to achieve encapsulation in oop and how does work encapsulation … Read more

Abstract class in java

An abstract class in java is a class that is a non-concrete class. By means of non-concrete is something that is not complete. You must think what’s the meaning of not complete? How we can say the class is incomplete? The answer is here if a class contains an abstract method then the class is … Read more

Interface in java

In the last article, we learned about the abstract class which is used to achieve abstraction in java. By using the abstract class we can achieve 1% to 100% of abstraction. To achieve full abstraction, the interface was introduced in java.In this article, we will read What is an interface in Java, how to use interface, and when to use interface in … Read more

Important rules for abstract methods

1. abstract method with the final keyword An abstract method can’t declare as final. Reason: abstract and final both terms are opposite to each other. An abstract method says you must redefine it in a derived class. A final method says you can’t redefine this method in a derived class. Let’s see how use of … Read more