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 is a technology?
What is difference between java and core?
Why is java more secure?
What is distributed application?
What is pure java?
What is api in j2ee?
public class ActionSearchBean extends
GenericSearchBean
What is callback methods Component methods called by the container to notify the component of important events in its life cycle?
What do you understand by connector? Explain connector architecture.
What is empty tag?
What is archiving?
Is c++ more secure than java?
What is javamail?
How many java languages are there?
How do I become an expert in java?