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 (1722)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 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 (147)
 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
how to call a method in different package?
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
Import the package in to the class, where other package's
method is useful.
 
Is This Answer Correct ?    14 Yes 3 No
Sandhya.s
 
Answer
# 2
import fully Qualified name of the package in which the
method is present
use the method as "classname.methodname"
or
create the object of that package using a fullyqualifed
name of that package and use the method
as "object.methodname
 
Is This Answer Correct ?    10 Yes 0 No
Venkatachalapathy
 
 
 
Answer
# 3
import package in the class.That package related methods are now accessible in a class.If u want call a method
classname.method(); or create a new object to a class and then call the method like objectname.method();
 
Is This Answer Correct ?    2 Yes 0 No
Kiranksj
 
Answer
# 4
You Must import the package with fully Qualified name of
the class contains method.
Now you can call a method as:classname.method();
You can create a new object to that class and then call the
method as objectname.method();
 
Is This Answer Correct ?    2 Yes 5 No
Taresh Nama
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
if the memory capacity is 700 presently occupied by process is 690. then another process request space(40) how this situation handled in java. Wipro 4
what is use of marker interface? give me good example?   2
Which class is the immediate superclass of the Container class?   1
What is "Java Native Interface" and how to use it? IBM 1
How will you override default serialization mechanism in java   2
Superclass of exception Nous 4
what is struts-config-xml?and its use?   3
what is custom tags with example? AMDOC 3
What are Transient and Volatile Modifiers? SAP-Labs 2
What is the purpose of the finally clause?   3
How to synchonise HashMap IBM 3
in a console we r giving java <class name> if r pressing enter where it'll goes CSC 2
 
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