• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
encapsulation in java..?
#1
hi, 
   I would like to know.
   What is encapsulation in java..?
Reply
#2
Encapsulation in Java is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation variables of a class will be hidden from other classes and can be accessed only through the methods of their current class.
Reply
#3
Encapsulation simply means binding object state(fields) and behaviour together. The whole idea behind encapsulation is to hide the implementation details from users.
Reply
#4
Encapsulation = Data Hiding + Abstraction. it means if any component is following Abstraction as well as data hiding then it is also following Encapsulation. Encapsulation:It is actually the process of binding data members and methods together in a unit.Each class in java itself is an example of encapsulation...
Reply
#5
thanks guys
Reply
#6
Encapsulation in Java is a process of wrapping code and data together into a single unit, for example, a capsule which is mixed of several medicines. ... Now we can use setter and getter methods to set and get the data in it. The Java Bean class is an example of a fully encapsulated class.
Reply
#7
Encapsulation in Java is a mechanism for wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation, the variables of a class will be hidden from other classes and can be accessed only through the methods of their current class.
Reply
#8
Encapsulation is the process of hiding information details and protecting data and behavior of an object from misuse by other objects. In Java, encapsulation is done using access modifiers (public, protected, private) with classes, interfaces, setters, getters...
Reply
#9
Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction.

Encapsulation in Java is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation, the variables of a class will be hidden from other classes, and can be accessed only through the methods of their current class. Therefore, it is also known as data hiding.
Mr. Quan Ha
403  FukiStore - Smartphone Accessories Shop!!!
Heart  Thanks & Best Regard!
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Java or php? sumitmodi 17 1,481 11-12-2018, 04:47 AM
Last Post: alexcollins
  What is volatile keyword in Java? sulbha 9 263 10-30-2018, 05:31 AM
Last Post: emmawatson8855
  Differentiate between StringBuffer and StringBuilder in Java programming. sulbha 1 147 09-11-2018, 11:11 PM
Last Post: sankalppatil
  What is difference between CyclicBarriar and Countdown Latch in Java ? sulbha 1 327 03-05-2018, 02:49 AM
Last Post: WebExpert
  Net or Java on Linux? confused after .Net is Open Source richardwalter 2 406 02-14-2017, 02:41 AM
Last Post: John Cage
  How to write data from MySql table to Excel using Java - See more at: https://www.gid richardwalter 0 350 02-11-2017, 04:47 AM
Last Post: richardwalter
  Java Help please.. richardwalter 0 306 02-04-2017, 06:03 AM
Last Post: richardwalter
  What Differs JavaScript from Java ? beingchinmay 0 781 01-07-2016, 01:28 AM
Last Post: beingchinmay
  JavaScript Resembles Java beingchinmay 0 597 01-07-2016, 12:56 AM
Last Post: beingchinmay

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


Webmasterbabble.com, © 2012-2018 .