0
Sololearn Java Abstract How the method has the int keyword
How the method has the int keyword ? Fill in the blanks to create an abstract class with an abstract method and inherit from it. abstract class Animal { public int age; public abstract int printAge(); // How the method has the int keyword ? } class Dog extends Animal { public int printAge() { return age; } }
1 Antwort
- 1
It is abstract method and it can be used in abstract class
This method is not implemeted
Key word int means that after implementation in inheritors this method must return some integer value