+ 2
(Ask)For java programmers
Hi! I would like to ask what is wrong with this code also, I just want to know more about abstraction on what it did,really appreciate the answer.thank you! https://code.sololearn.com/cx9BG0zERnvY/?ref=app
6 ответов
+ 4
An abstract class is needed to place common methods in one place, so those who inherit from it implement all methods of the abstract class. An abstract class is a workpiece / form / base to other classes
+ 3
Your brackets are not positioned correctly. After the main methods, you need to close the AbstractAreas class
+ 3
Do not worry about the abstract class. There are also interfaces that are completely abstract classes. If you can write different methods in a normal abstract class, this is not possible in the interface. The interface uses only abstract methods. However, the interface allows you to perform multiple inheritance.
I myself once refused to study Java because of a misunderstanding of the abstract class and returned a week later)
+ 2
thank you! don't know what abstraction actually did to the code so just wanted to ask too about abstraction
+ 2
tnx I think I get it for now😊
+ 2
this also can help you.
https://www.tutorialspoint.com/java/java_overview.htm