单选题:下列程序的运行结果是( )
下列程序的运行结果是( ) @[B](2)
```
public class Test {
public static void main (String[] args) {
try {
System.out.println("Welcome to Java");
return;
}
finally {
System.out.println("The finally clause is executed");
}
}
}
```
A. Welcome to Java
B. Welcome to Java ,然后是The finally clause is executed
C. The finally clause is executed
D. 以上都不是
A.Welcome to Java
B.Welcome to Java ,然后是The finally clause is executed
C.The finally clause is executed
D.以上都不是
答案:B
```
public class Test {
public static void main (String[] args) {
try {
System.out.println("Welcome to Java");
return;
}
finally {
System.out.println("The finally clause is executed");
}
}
}
```
A. Welcome to Java
B. Welcome to Java ,然后是The finally clause is executed
C. The finally clause is executed
D. 以上都不是
A.Welcome to Java
B.Welcome to Java ,然后是The finally clause is executed
C.The finally clause is executed
D.以上都不是
答案:B