+ 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

23rd Mar 2018, 9:47 AM
Sha
Sha - avatar
6 Respuestas
+ 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
23rd Mar 2018, 10:12 AM
Aidos Zhakupov
Aidos Zhakupov - avatar
+ 3
Your brackets are not positioned correctly. After the main methods, you need to close the AbstractAreas class
23rd Mar 2018, 9:58 AM
Aidos Zhakupov
Aidos Zhakupov - avatar
+ 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)
23rd Mar 2018, 10:35 AM
Aidos Zhakupov
Aidos Zhakupov - avatar
+ 2
thank you! don't know what abstraction actually did to the code so just wanted to ask too about abstraction
23rd Mar 2018, 10:07 AM
Sha
Sha - avatar
+ 2
tnx I think I get it for now😊
23rd Mar 2018, 10:28 AM
Sha
Sha - avatar
23rd Mar 2018, 10:56 AM
Jemwel Godinez
Jemwel Godinez - avatar