Can someone give me an example code which interpret the encapsulation concept in Java please | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone give me an example code which interpret the encapsulation concept in Java please

29th Dec 2021, 12:09 PM
Mirasol Sontousidad
Mirasol Sontousidad - avatar
2 Answers
+ 1
You can go to code section of this app Search the encapsulation in searchbar Select the language "java" For better results choose "most popular" https://www.sololearn.com/learning/2162/ https://code.sololearn.com/cJ37hYFs4smY/?ref=app
29th Dec 2021, 12:50 PM
Shino
Shino - avatar
+ 1
Encapsulation means simply combining data and methods of class into a single unit of block.. So any class is best example of Encapsulation in java.
29th Dec 2021, 4:01 PM
Jayakrishna 🇮🇳