Can we access private data outside of the class directly in
java programming language? Why There is no runtime checking
in java, which leads to access the private data directly
outside of a class?

Answer Posted / chaitali

No,we cannot access private data outside of class in java.
There is only compile time checking and no runtime check in
java because Java supports concepts like Polymorphism and
reflection where on runtime certain decisions are taken

Is This Answer Correct ?    14 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to sort array in descending order in java?

722


How do you invoke a method?

748


Why are data types important?

767


What is the use of a conditional inclusion statement in Java ?

815


How many inner classes can a class have?

808


Why array is used in java?

717


How transient variable is different from volatile variable?

774


Give me some null interfaces in java?

807


What does business logic mean?

749


Write a program to check string is palindrome without using loop?

786


How does a for loop work java?

781


What is a list in java?

726


How can you make a class serializable in java?

776


What is stack explain?

689


What is unicode full form?

753