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

it will give compilation error

Is This Answer Correct ?    0 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which api is provided by java for operations on set of objects?

1008


What is this () in java?

633


What access modifiers can be used for methods?

626


Can we write multiple catch blocks under single try block?

643


What are the topics in core java?

602






What are the differences between Java 1.0 and Java 2.0?

1731


Can we serialize singleton class?

615


What is externalizable interface?

665


What is a instance variable?

640


Why do we use variables?

566


What is difference between module and function?

609


What is the use of hashmap in java?

625


What is the purpose of a transient variable?

656


Why string is not a wrapper class?

723


Can an interface be defined inside a class?

581