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 the difference between session bean and entity bean ?
What is single tier architecture in java?
What is java awt event?
Why java is not 100% object oriented language?
How do I run java?
to update a batch in a table in jdbc which method of statement object is used
What do you understand by j2ee?
What is client-certificate authentication?
What is initialization parameter?
What is the difference between java and core java?
What is a j2ee module?
Why is java called technology?
What is create method?
What is platform independent in java?
Which is latest technology in java?