Given: Integer i = new Integer (42); Long l = new Long (42); Double d = new Double (42
0); Which two expressions evaluate to True
(i == 1) B
(i == d) C
(d == 1) D
equals (l)) E
equals (l)) F
equals (42)) G
none of above Answer: 2
Given: public class Foo { public static void main (String [] args) { StringBuffer a = new StringBuffer("A"); StringBuffer b = new StringBuffer ("B"); operate (a,b); System
println(a + "," +b); } static void operate(StringBuffer x, StringBuffer y) { x
append(y); y = x; } } What is the result
The code compiles and prints “A,B”
The code compiles and prints “A,A”
The code compiles and prints “B,B”
The code compiles and prints “AB,B”
The code compiles and prints “AB,AB”
The code does not compile because “+” cannot be o