Given the following classes which of the following will compile without error?
interface IFace{}
class CFace implements IFace{}
class Base{}
public class ObRef extends Base{
public static void main(
String argv[]){
ObRef ob = new ObRef();
Base b = new Base();
Object o1 = new Object();
IFace o2 = new CFace();
}
}
1) o1=o2;
2) b=ob;
3) ob=b;
4) o1=b
correct answer is 1,2,4, i can not understand why the choice 1 and 4 is correct.Where the Object 01 come from ,what mean ?