I haven't been able to find a clear answer for this. Is there a definitive answer?
-
"abstract superclass"? you mean abstract class? If so, no. – kosa Aug 07 '13 at 19:55
-
[Abstract Classes](http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.1.1.1) – Rohit Jain Aug 07 '13 at 19:56
-
Sure ... if you want to lose half the functionality of an abstract class and ... create an interface. – Brian Roach Aug 07 '13 at 19:56
-
3I've down-voted. Surely even cursory research in the subject of abstract classes would turn up multiple examples with concrete methods in an abstract class. – Duncan Jones Aug 07 '13 at 19:57
-
1Or the tutorial - http://docs.oracle.com/javase/tutorial/java/IandI/abstract.html – Brian Roach Aug 07 '13 at 19:59
2 Answers
Short answer - no. If you're writing something that all methods are listed as abstract, consider an interface
instead.
Long answer: In an abstract class you have the ability to have some methods be fully implemented (generally, methods you intend to share among extenders of the abstract class) and other methods that can be abstract to force extenders to implement them. All methods (abstract and implemented) can be freely referenced by all other methods as usual.

- 5,987
- 5
- 45
- 73
Abstract classes don't have to have any abstract methods. You can have some or all methods as abstract. All methods of an interface are abstract whether you state this or not. If you implement an interface but don't define the methods, they are effectively abstract in the class even if you don't mention them in the abstract class.
e.g.
interface A {
void method(); // implicitly abstract
}
abstract class B implements A {
// B has one abstract method
}

- 525,659
- 79
- 751
- 1,130