I came to situation :
public interface Intr {
public void m1();
}
public abstract class Abs {
public void m1() {
System.out.println(\"Abs.m1
Here both the interface and abstract class have same method.
You have one class name is hello and exteds abstract class and implement interface its true and you override meth1 method on hello class its fine and its compile correctly and not given any error but her you can't identify which class method is override like abstract class or interface.
This is runtime polymorphism you cant create object of abstract class and interface but you can create reference variable of that. Here solution is you can't identify that on compile time its actual override at run time.
interface hi
{
public void meth1();
}
abstract class Hullo
{
public abstract void meth1();
}
public class Hello extends Hullo implements hi
{
public void meth1(){
System.out.println("hello");
}
hi h= new Hello();
h.meth1();//its means interface method is override. and its decide when we call method.
hullo hu= new Hello();
hu.meth1();//its means abstract class method is override.
}