What will be the output of the program?


			  		

Loading

Choose the correct option.

What will be the output of the program?

public class Test178  {     
public static void main(String[] args) {
String s = "foo";
Object o = (Object)s;
if (s.equals(o)) {
System.out.print("AAA");
}
else {
System.out.print("BBB");
}
if(o.equals(s)) {
System.out.print("CCC");
}
else {
System.out.print("DDD");
}
}
}

 

A. AAACCC
B. AAADDD
C. BBBCCC
D. BBBDDD