码迷,mamicode.com
首页 > 编程语言 > 详细

java abstraction and encapsulation

时间:2019-04-03 14:05:23      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:get   variable   toc   diff   setter   hid   res   str   detail   

How is Abstraction different from Encapsulation?

Abstraction happens at class level design. It results in hiding the implementation details. Encapsulation is also known as “Information Hiding”.

An example of encapsulation is marking the member variables private and providing getter and setter for these member variables.

java abstraction and encapsulation

标签:get   variable   toc   diff   setter   hid   res   str   detail   

原文地址:https://www.cnblogs.com/longchang/p/10648340.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!