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
 
Is 'null' a keyword?   8
watz the difference between abstract class and interface? Which one u ill choose as a designer? Sonata 1
In what types of operations an ArithmeticException will be thrown?   3
write java code to print second max number in the array Huawei 12
My application URL : http://localhost:8080/Application/Login.jsp. When a user enter this url in IE then, how it get Login.JSP Page exactly? what are the processes will happen from when we submit the URL to get Login.jsp? TCS 3
What is meant by Session? Explain something about HTTP Session Class?   1
System.out.println(101/14) what is the output? a)6 b)14 c)7.14 d)0 Accenture 8
does java support default argument in Method?   1
When should I use abstract classes and when should I use interfaces?   2
Difference between ?System.out.println? and ?System.error.println?? Sai-Softech 7
Does Java support multiple Inheritance?   12
How many methods does cloneable interface contains?   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