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

What is flag in java?

1045


What access modifiers can be used for methods?

1157


Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?

1162


Can we instantiate interface in java?

1187


What are constants?

1103


Why do we need data serialization?

1040


Can we extend immutable class?

1037


What do you understand by casting in java language?

1075


How to create com object in Java?

1118


What is the difference between a loader and a compiler?

1087


Are arrays dynamic in java?

1085


Which collections are thread safe in java?

958


Explain the difference between extends thread vs implements runnable in java?

1194


What does a method signature consist of?

1049


What is JVM and is it platform independent?

1104