Given:
public abstract class Wow {
private int wow;
public wow (int wow) {
this.wow = wow;
}
public void wow () {}
private void wowza () {}
}
What is true about the class Wow?
A.
It compiles without error.
B.
It does not compile because an abstract class cannot have private methods.
C.
It does not compile because an abstract class cannot have instance variables.
D.
It does not compile because an abstract class must have at least one abstract method.
E.
It does not compile because an abstract class must have a constructor with no arguments.
Explanation:
An abstract class is a class that is declared abstract—it may or may not include abstract methods
(not B, not D). Abstract classes cannot be instantiated, but they can be subclassed.
The code compiles with a failure for line ‘public wow (int wow) {‘
Answer: A ?
Yes, A is correct. This exam has too many questions answered incorrectly…
Correct answer is C i believe abstract class not allowed to have implementation
I agree with answer A
Tried it in Eclipse getting no errors
a