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
Is java 100 percent pure object oriented?
What is java technology stack?
Which server is best for java?
What is j2ee api?
What does java awt stand for?
What is tomcat in j2ee?
What is a jbutton in java?
Why java is called portable language?
What is single tier architecture in java?
What is advance java?
What is a java developer?
What is caller principal?
What do you understand by business logic?
What is j2ee technology?
How long does it take to master java?