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

You can not call a method like above unless untill ur
classes are static.
You can create instance and u can use as

Instance.method();

Is This Answer Correct ?    17 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between keyword and identifier.

589


What is a boolean in java?

575


What classes of exceptions may be caught by a catch clause in java programming?

698


What is a dynamic array java?

513


What is the purpose of a default constructor?

576






What is dynamic array in java?

520


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

1795


Can you instantiate the math class?

598


What are static blocks and static initalizers in java ?

582


Which is easier .net or java?

641


What is use of a abstract variable?

534


What is a flag variable?

557


what is the volatile modifier for? : Java thread

521


Explain about the select method with an example?

590


What is identifier in java?

552