Java三大特性:封装 继承 多态 各自用一句话总结

Encapsulation: we hide the details of implementation, and we only allows the user to use what we want them to use. it enhances the security and simplified the process so the user won’t have to understand all the details before use it.
Inheritance: based on the class we have, we add more new methods and override methods to extend the function of current class. so that makes our program easy to maintenance and reduce the redundant codes.
Polymorphism: 1 inheritance: extend, 2 overriding, 3 parent reference to object of child class: Parent p = new Child();

posted @ 2020-10-28 06:53  EvanMeetTheWorld  阅读(10)  评论(0)    收藏  举报