Tuesday, September 13, 2011

Quiz of the day | OCPJP (8)

Given:

1. public class MyOffice {
2. public static void main(String[] args) {
3. String name = "PT";
4. name.concat("Time");
5. name = go(name);
6. System.out.println(name);
7. }
8. static String go(String name) {
9. name.concat("Excelindo");
10. return name;
11. } }

What is the result?
A. Time
B. PT
C. TimeExcelindo
D. PTTime
E. PTExcelindo
F. PTTimeExcelindo
G. Compilation fails.


DOWNLOAD the answer

0 comments: