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 (1728)
 Advanced Java interview questions  Advanced Java Interview Questions (332)
 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
 
how can we import the user defined package without classpath? Infosys 1
What is the default initialized value of String type variable?   4
How do you relate a Interface to a Class? Tell me in Detail?   4
what is j2se   3
Hi am an mca graduate . i have done bsc maths in my degree . every company asks me why you make shift from maths group to computere field . What i need to answer?   2
3) Suppose you are a very rich person, having 50 rooms and you have lost the key for one of the room's. How effectively you can find this key? (Qs2 and Qs3 are related) RBS 3
What is the use of static import ? Rolta 4
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 } } DNS 2
what is ejb? what is the importance of ejb? Photon 2
Sample code to retrieve objects from HashMap in sorted ascending order?   2
String Reverse in Java...!   5
why the equals method can be override?when we override the equals method?   5
 
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