cancel
Showing results for 
Search instead for 
Did you mean: 

Interface in java

Former Member
0 Kudos

Hello ! i m a beginner in java .Kindly help me to solve these questions

Which of the following statements will compile without error?

interface IFaca{}

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();

}

}

A. o1=o2;

B. b=ob;

C. ob=b;

D. o1=b;

Options----

1. A,B,D

2. A,B,C

3. B,C,D

4. D,C,A

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Payal,

In this case Option 1 is correct.

Please assign points if it is helpful.

Regards,

Richa.

Answers (0)