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 / manoj

// Do you want to say like this?

//import like this:

import Package1.classA
import Package2.classB

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

Is This Answer Correct ?    27 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a function argument in java?

957


What is io stream in java?

996


Can we have more than one package statement in source file ?

982


What is the use of parse function in java?

938


What is the relationship difference the canvas class and the graphics class?

1022


Can a class extend 2 classes in java?

994


Explain the features of interfaces in java?

934


What is not object oriented programming?

883


List types of storage classes in java?

1088


Can a string be null?

942


What are the 4 types of research methods?

886


Is java platform independent?

930


Is list ordered in java?

932


What is the difference between form & report?

995


What are byte codes?

1150