why i can not access private variable in other class?
Answer Posted / srinu
private variable are visible in the with in class only.This
are not accessble to other class with in same package or
other diiferent package .so we can't access the private
variable out side of classes
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Why do we create dto in java?
What is scrollable resultset in java?
What are the advantages of lambda functions?
What is meant by code profiling?
What is http session in java?
What is an api in java?
What type of parameter passing does java support?
What is stateful in java?
What is messaging queue in java?
What are microservices in java?
there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats. One person can reseve only 5 seat at a time. If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats. the following class is given public class seat { char name; int seat; boolean isSeatempty } 1.Draw require class digram and object diagram. 2.Write function seatallot(int noofperson) to allocate seat with seat nuber printed for the each name.
Is java a framework?
can a program use more than one command-line argument?
What is the difference between the boolean & operator and the && operator?
How can I protect myself? : java security