EDIT: I have a java class which calls two jars which has same class and method name. Can we implement like this ? how did the JVM know which right class to pick
import com.jar.Myclass; // should go to jar 1
import com.jar.Myclass; // should go to jar 2
public class Test {
public void getDetails(){
if (true){
Myclass.getDetails(); // should go and look in jar 1
}else {
Myclass.getDetails(); // should go and look in jar 2
}
}
}
Any suggestion on this experts