Abstract classes

What is Java abstract method abstract class with Example?

I explain the Java abstract method and abstract class in a different style where it is easier to understand the concept. One day, the Chief Design Engineer of Maruthi Suzuki thought every vehicle that rolls out of factory should have some common features. He designs an abstract class as follows and demands all the Design …

What is Java abstract method abstract class with Example? Read More »

abstract class vs final class

Abstract class and Final class are very different basically in their nature and usage in Java language. Both are very contrary in their functionality. Following table gives the differences: abstract class vs final class. Property Abstract class Final class Subclassing Should be subclassed to override the functionality of abstract methods Can never be subclassed as …

abstract class vs final class Read More »

Java Made Clear: Difference between Abstract class Interface

Difference Abstract class Interface Summary: By the end of this tutorial" Difference Abstract class Interface", you will be comfortable to their differences. Introduction A novice feels why both abstract class and interface are required in Java as an abstract class can contain all abstract methods also. The main difference just on the face is Interface …

Java Made Clear: Difference between Abstract class Interface Read More »

Can we create abstract class object ?

Abstract class object: Put the same question for an interface. Everyone says anonymously, "no" because there is no implementation (body) of methods as all are abstract. But what about with abstract class? Coming to an abstract class, the question arises as one variation of abstract class is that it can contain all concrete methods. I …

Can we create abstract class object ? Read More »

Abstract class main() method

Can you have Abstract class main() method? Yes, definitely, because main() is a concrete method and abstract class allows concrete methods. But what you can you do with the main() when you are not allowed to create objects of abstract classes. But, you can create objects of another class and use other class methods by …

Abstract class main() method Read More »

Abstract Static Method Java

Abstract Static Method looks odd as it cannot exist in Java and declaring so, compiler will not keep quiet. Discussed with Example, Screenshot in Simple terms in Question/Answer format for a Beginner. 1. Can we declare Abstract Static Method? Before answering this question, let us brief about abstract methods. Following points are to be remembered …

Abstract Static Method Java Read More »

Abstract class constructor and Interface abstract

These are two different concepts which can be explained easily by a novice having a little bit knowledge of abstract classes and interfaces. It is advised to read abstract classes before going through this topics. It gives thorough understanding of abstract classes where some concepts you may not aware of, perhaps. Before going further let …

Abstract class constructor and Interface abstract Read More »

Java Abstract Class Tutorial Example

Java Abstract Class Tutorial Example Summary: By the end of this tutorial "Java Abstract Class Tutorial Example", you will be comfortable to practice abstract methods and abstract classes. abstract Modifier You have seen earlier two access modifiers – static and final. Now let us go for another modifier "abstract". "abstract" modifier (and also keyword) can …

Java Abstract Class Tutorial Example Read More »