on 09-21-2006 8:30 AM
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
hi Payal,
In this case Option 1 is correct.
Please assign points if it is helpful.
Regards,
Richa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.