August 2003
Intermediate to advanced
672 pages
16h 23m
English
Review Questions |
| 10.28 |
What will be the result of attempting to compile and run the following program?
public class MyClass {
public static void main(String[] args) {
String s = "hello";
StringBuffer sb = new StringBuffer(s);
sb.reverse();
if (s == sb) System.out.println("a");
if (s.equals(sb)) System.out.println("b");
if (sb.equals(s)) System.out.println("c");
}
}
Select the one correct answer.
|
Read now
Unlock full access