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

What is externalizable interface?

843


what are abstract functions?

789


What is proper subset?

774


What is math exp in java?

806


can I implement my own start() method? : Java thread

770


Is finalize() similar to a destructor?

809


What are decalarations?

862


Is it possible to override the main method?

756


What is diamond operator in java?

728


What are the major advantages of internal iteration over external iteration?

846


What is byte [] in java?

780


What's the difference between int and integer in java?

868


How many bytes are there?

765


Can the garbage collection be forced by any means?

749


Difference between serialization and deserialization in java?

882