Skip to main content

All Questions

3 votes
1 answer
4k views

Should an abstract class implement an interface, as opposed to defining its own abstract methods?

I'm defining a class structure for persisting to our cassandra database, and I'm unsure about using a combination of an abstract class and an interface. I have two concrete classes, one for persisting ...
Eoin's user avatar
  • 141
3 votes
1 answer
522 views

Best design for classes that draw objects but do not inherit from JPanel

I'm doing the exercise 10.1, page 476 from the book Java: How To Program, Early Objects by Paul and Harvey Deitel (10th Edition). Modify the MyLine, MyOval and MyRectangle classes of GUI to create ...
Yos's user avatar
  • 167
-1 votes
3 answers
2k views

Can I say Interface is a set of general behavior? [duplicate]

I'm new to OOP. Can I say Interface is a set of general behavior that may be have and act uniquely by a set of objects that have in common? And Abstract class has similarity with Interface but it have ...
Hendy's user avatar
  • 11
5 votes
6 answers
9k views

What are abstract classes and abstract methods?

I got several explanations but so far I'm not able to understand that what are the abstract classes and methods in Java. Some said it has to do something with the security of the program, other said ...
Umer Hassan's user avatar