Here is my code, I cannot reason out why the output is coming to be like that. If anyone can explain please. 

```
import java.io.*;
class b {
void m(b a){
System.out.println(" b");
}  
}
class bcd extends b {
    void m(bcd a){
System.out.println("bcd");
 }  
}
class cde extends bcd {
void m(cde a){
System.out.println("cde");
}  
}
public class ABC{
public static void main(String[] args){
b ob1= new cde();
cde ob2=new cde();
ob1.m(ob2);
}
}

```