ALLInterview.com :: Home Page            
 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                      
Google
   
 
Categories >> Software >> Java Related >> Java J2EE >> Core Java
 
 


 

 
 Core Java interview questions  Core Java Interview Questions (1720)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (43)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (195)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (145)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
Question
they asked class A{}
class B{}
class c{}
all the three class saved as a single file,there is no main
method in the file
and anothe class
M.java
class m
{
psvm(String args[])
{
// here the parent class can access
}
}
 Question Submitted By :: Ravi
I also faced this Question!!     Rank Answer Posted By  
 
  Re: they asked class A{} class B{} class c{} all the three class saved as a single file,there is no main method in the file and anothe class M.java class m { psvm(String args[]) { // here the parent class can access } }
Answer
# 1
What is the Question? Please explain... 
Is This Answer Correct ?    0 Yes 1 No
Cool_duzz
 
  Re: they asked class A{} class B{} class c{} all the three class saved as a single file,there is no main method in the file and anothe class M.java class m { psvm(String args[]) { // here the parent class can access } }
Answer
# 2
Yes. You can call parent classes ( i.e A or B or C) inside
of class M by instantiate and invoke methods. If parent
classes have static methods you can directly access without
instantiating.
 
Is This Answer Correct ?    1 Yes 0 No
Suresh
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Explain about Superclass and Subclass?   6
How can you eliminate duplicates?   2
basic difference b/w ALL types of JDBC driver. Systematix 1
Why do we use public static with the main function in Java? Infosys 13
Difference between array and arraylist. Sai-Softech 23
what is the difference between String and StringBuffer classes? Infosys 2
What are the similarities between an array and an ArrayList?   3
What are the parameters used in Connection pooling? IBM 1
When should I use abstract classes and when should I use interfaces?   2
define System.out.println(); what is the meaning!   19
what is dynamic method dispatch ? Fidelity 26
Is Java is 100% pure OOPS? Explain? ANZ 26
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com