Which of the following declares an abstract method in an abstract Java class?
A.public abstract method();
B.public abstract void method();
C.public void abstract Method();
D.public void method() {}
Answers
Answered by
5
Hello mate
here's your answer
¤¤¤¤¤¤¤¤¤¤¤¤¤
Option B✔✔
Public abstract void method.
¤¤¤¤¤¤¤¤¤¤¤¤
Hope it helps you
here's your answer
¤¤¤¤¤¤¤¤¤¤¤¤¤
Option B✔✔
Public abstract void method.
¤¤¤¤¤¤¤¤¤¤¤¤
Hope it helps you
Answered by
2
The correct answer is option (B.) public abstract void method();
- public abstract void method(); declares an abstract method in an abstract Java class.
- A method without body (no implementation) is known as abstract method.
- A method must always be declared in an abstract class, or in other words you can say that if a class has an abstract method, it should be declared abstract as well.
- public abstract class GraphicObject { // declare fields // declare nonabstract methods abstract void draw(); }.
Similar questions
English,
7 months ago
Biology,
7 months ago
Computer Science,
1 year ago
Science,
1 year ago
Biology,
1 year ago