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


Please Help Members By Posting Answers For Below Questions

What is map and flatmap?

625


Is jdk an ide?

503


How to reverse the singly linked list(In Node data members are(int data,int pointerTONext))

1357


Where are group policies stored? : java security

490


explain isalive() method under thread class?

590






What is difference between loosely coupled and tightly coupled in java?

444


What is the difference between the boolean & operator and the && operator?

529


What can open a jar file?

475


What is a flatmap?

505


What gives java it’s “write once and run anywhere” nature?

476


What is transaction management in java?

518


What is a container in java?

479


What is the meaning of loosely coupled in java?

478


In which language eclipse is developed?

473


What is the use of flatmap in java 8?

467