Use of private variable while creating properties ???
Answer Posted / m4n07
I am newbie in J2EE & looking for strong basic behind each
concept as,
Why do we use private access specifier before each variable of
type property bcoz ultimately to access it outside the class
we use public method as getter & setter ?
If we use getter & setter to access it outside the class so
better we make variable as public so that it is easily
available outside of the class...
Please guide me why do we use as private ????
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is ear file?
Which software is used for java?
What is a web container j2ee?
to update a batch in a table in jdbc which method of statement object is used
What is mean by connection pooling?
What is jradiobutton in java?
I Want build and release interview questions
What are defined as web components?
What is java naming and directory service?
What is connector?
What do you understand by actionform?
What is a j2ee container?
Is java procedural or object oriented?
On which platform j2ee is based?
Why is java called technology?