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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

When should I use a singleton?

1049


What are static blocks and static initalizers in java ?

1079


What is singleton class in ruby?

1016


What is math floor in java?

949


What are three types of loops in java?

1136


What is arrays fill in java?

1012


What does a boolean method return?

1234


Tell me about your ability to work under pressure

2198


When do you get classcastexception?

1031


Is empty in java?

1059


What is use of arraylist in java?

1177


Why is the main method declared static?

1137


What is use of a abstract variable?

990


Does constructor be static?

1036


What is the purpose of using java.lang.class class?

1016