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                      
tip   SiteMap shows list of All Categories in this site.
Google
   
 
Categories  >>  Software  >>  Java Related  >>  Java J2EE  >>  Core Java
 
 


 

 
 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
how to call a method in different package?
 Question Submitted By :: Raaga
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to call a method in different package?
Answer
# 1
Import the package in to the class, where other package's
method is useful.
 
Is This Answer Correct ?    11 Yes 2 No
Sandhya.s
 
  Re: how to call a method in different package?
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
 
 
 
  Re: how to call a method in different package?
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 ?    1 Yes 0 No
Kiranksj
 
  Re: how to call a method in different package?
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
 
What is Locale class? MySoft1
Name the package that always imported by default?  4
Can there be an abstract class with no abstract methods in it?  1
Infinite loop using while ?  4
Why Java is not purely object oriented? Persistent48
What is run time polymorphism? Elementus-Technologies6
what is webservices? CTS1
Is 'sizeof' a keyword?  7
what should do when using multiple catch() block & what should never do for the same?  1
How HashMap implemented in java? how it internally works when values are added or searched from hashMap?What is the difference betweenthe implementation of hashmap and Linked Hashmap? IBM2
how can i take the inputs from users in java program? Wipro7
which method throws exception of type Throwable  2
 
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 © 2012  ALLInterview.com.  All Rights Reserved.

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