Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to call a method in different package?

Answers were Sorted based on User's Feedback



how to call a method in different package?..

Answer / sandhya.s

Import the package in to the class, where other package's
method is useful.

Is This Answer Correct ?    18 Yes 4 No

how to call a method in different package?..

Answer / venkatachalapathy

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 ?    12 Yes 0 No

how to call a method in different package?..

Answer / kiranksj

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

how to call a method in different package?..

Answer / taresh nama

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 ?    3 Yes 5 No

Post New Answer

More Core Java Interview Questions

what is the difference between a java object reference and c++ pointer?

4 Answers  


What is the difference between C++ & Java?

78 Answers   College School Exams Tests, HAL, SUN, Syntel, TCS, Wipro,


What access modifiers can be used for class ?

0 Answers  


What are aggregate functions explain with examples?

0 Answers  


How do you achieve singleton?

0 Answers  


Explain the difference between collection api and stream api in java8?

0 Answers  


What is the super void?

0 Answers  


What is the difference between path and classpath variables?

0 Answers  


if am have 100 threads(for ex:T1,T2---T100) how we give priority to these threads and how the system excute these threads

2 Answers  


Differentiate storage classes on the basis of their scope?

0 Answers   Fidelity,


Does A Class Inherit The Constructors Of Its Superclass?

0 Answers   Wipro,


How do I enable java in safari?

0 Answers  


Categories