How to access a variable if it is declared as private?

Answer Posted / neo

You can access the private variable in to the other package
or other classes by inheritance . to inherite the super
classes all the resources comes in to sub classes private
also in this context.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ide with example?

725


What are "class access modifiers" in Java?

829


How do I compare two strings in word in java?

755


What is a parameter in matrices?

766


What is the difference between sleep and wait in java?

729


Does java return by reference?

759


What is struts in java?

818


Why is core java important?

795


why java uses class level type casting ?

2434


What is data object example?

724


What is nested class?

764


What is an argument java?

724


What are conditionals and its types?

839


What is a buffer in java?

793


Give some features of interface?

820