ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
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?
 Question Submitted By :: Uday Kiran
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 ?    10 Yes 5 No
Chaitali
 
  Re: 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
# 2
This is a compile time activities, the scopes and the access
issues are handled at the compile time and this exception is
not the subclas of the runtime exception class and doesnt go
unchecked during compile time, they are checked at compile
time and the compile time exceptions are checked exceptions
which are checked by the compiler before hand and the
example of runtime exception is say bad logic like array
having -ve size and division by zero where actual excecution
occurs in JRE of the byte code.
 
Is This Answer Correct ?    0 Yes 0 No
Puneet
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
I have a Arraylist object, it has duplecate values also. Now question is i want delete duplecate data in that objet with out using Set? Aricent5
what is bytecode? watz the difference between machine code and bytecode? Oracle4
What is 3-tier model? Wipro3
Explain the term serialization? Wipro6
why applet doesn't have main? isn't possible a program with out main?  5
static inner classes means..?  1
why to use transient variables when static variables can be used for Serialization  3
How to set the Heap size in Java ? HCL2
What are the standards to place package statement within a source code file?  1
What is the purpose of the finally clause?  3
string is immutable? right every one knows that, my question is it advantage or disadvantage making string immutable? HCL4
What is Applet Flickering ? Persistent1
How 'java' got its name and what it stands for?  5
Create a form of user Login in JSP, that accepts the user name and password from user and authenticate it with user names and passwords stored in database. (Plz provide me answer immediately)  1
What is an Exception ?  6
Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods? Ericsson3
How can you say HashMap is syncronized? IBM13
How you can create a radio buttion using Checkbox class?  1
What modifiers are used for interface declaration?  3
JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isThreadSafe="false". Explain it? Thanks, Seenu Huawei3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com