Given:
1. class Test2 {
2. static String setMessage(String str) {
3. return str + “How are you doing?”;
4. }
5.
6. public static void main(String[] args) {
7. String str = “Hello! “;
8. str = setMessage(str);
9. System.out.println(“str : ” + str);
10. }
11. }
What is the result?
A.
str : Hello! How are you doing?
B.
Compilation fails because of an error at line 7.
C.
Compilation fails because of an error at line 8.
D.
Compilation fails because of an error at line 2.
E.
Compilation fails because of an error at line 3.
F.
str : Hello!
G.
str : How are you doing?