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...

Package1 and Package2 both have a method name lets say
"methodA" with different implementation. When I import both
the packages in a java class how can I use both the methods?

Answer Posted / shiv

//import like this:

import Package1.class
import Package2.class

//use it in your class
class yourclass
{
class.methodA(); // Package1 method call
class.methodA(); // Package2 method call
}

Is This Answer Correct ?    6 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are three ways in which a thread can enter the waiting state? : Java thread

963


What is static keyword in java?

966


Why is stringbuffer called mutable?

944


Why do we need hashmap in java?

1050


What does method mean?

982


What about member inner classes?

1051


How do I get 64 bit java?

1029


What is a ternary operator in java?

952


What does super keyword do?

1034


What modifiers may be used with an inner class that is a member of an outer class in java programming?

1037


who can i handle multiple client in RMI

1846


how does the run() method in runnable work? : Java thread

878


Explain purpose of sleep() method in java?

1070


What is polymorphism and what are the types of it?

950


What class allows you to read objects directly from a stream?

1290