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!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
+ 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 ā˜