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 do you understand by connector? Explain connector architecture.
What is j2ee product provider?
What is core java and j2ee?
What is java naming and directory service?
What is the ear file?
What is actionerrors?
What is java ee technologies?
Is string an object in java?
How long does it take to master java?
What is DDP?
whay java does not support bass by reference
What is single tier architecture in java?
What spring is in related to j2ee?
What is container-managed persistence?
Why is java more secure?