1 public class Foo {
2 public static void main (String [] args) {
3 StringBuffer a = new StringBuffer ("A");
4 StringBuffer b = new StringBuffer ("B");
5 operate (a,b);
6 system.out.printIn{a + "," +b};
7 )
8 static void operate (StringBuffer x, StringBuffer y) {
9 x.append {y};
10 y = x;
11 )
12 }
What is the result?
A. The code compiles and prints "A,B".
B. The code compiles and prints "A,A".
C. The code compiles and prints "B,B".
D. The code compiles and prints "AB,B".
E. The code compiles and prints "AB,AB".
F. The code does not compile because "+" cannot be overloaded for StringBuffer.
Answer: D
Features from MVC2 vs MVC3 vs MVC4 vs MVC5 vs MVC6
-
*MVC 2 *
- Customer Side Validation
- Templated Helpers
- Regions
- Nonconcurrent Controllers
- Html.ValidationSummary Helper Method
...
7 years ago
0 comments:
Post a Comment