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 OOP Language?

1020


What is the difference between the font and fontmetrics classes in java programming?

1025


What is a class object?

916


Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.

986


Which is illegal identifier in java?

1018


What is the memory leak in java?

964


What is the use of default method in interface in java? Explain

928


When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?

982


Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?

939


what is difference between equals and ==?

997


What is the difference between pass by reference and pass by pointer?

1000


Should database connections be singleton?

926


what is a working thread? : Java thread

994


Can java arraylist hold different types?

990


Explain about fail safe iterators in java?

962