What is meant by Encapsulation? Can you write a class to
explain encapsulation?

Answer Posted / srinivasa

All the javabeans written in java follows encapsulation.
In java bean variables are declared as private for
security. will be accessed using setter and getter method.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the rules for variable declaration?

506


Is null a value?

564


What do you mean by compiler?

585


Can we define constructor in inner class?

544


What is math floor in java?

475






How to create a base64 decoder in java8?

559


How many bytes is 255 characters?

555


what is deadlock? : Java thread

527


Can we start a thread twice in java?

510


Is a string literal?

525


What are the principle concepts of oops?

537


What is the difference between array list and vector in java?

509


Explain heap sort?

700


What is are packages?

589


Can java inner class be static?

559