If we define a class as abstract, then it class must contains AT LEAST ONE SINGLE ABSTRACT METHOD THAT MUST BE IMPLEMENTED. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

If we define a class as abstract, then it class must contains AT LEAST ONE SINGLE ABSTRACT METHOD THAT MUST BE IMPLEMENTED.

24th Jun 2023, 1:40 AM
Oliver Pasaribu
1 Answer
+ 3
Not really. It's the other way around: a class with at least one single abstract method must be defined as abstract. Abstract classes can have non-abstract methods and it's not mandatory for them to have abstract methods. https://docs.oracle.com/javase/tutorial/java/IandI/abstract.html
24th Jun 2023, 5:29 AM
Kevin ★