知道为什么吗?
Q78
What is the result of attempting to compile and run the following program
1. public class Test {
2. public void method(Object o) {
3. System.out.println("Object Version");
4. }
5. public void method(String s) {
6. System.out.println("String Version");
7. }
8. public static void main(String args[]) {
9. Test test = new Test();
10. test.method(null);
11. }
12. }
Select one correct answer
a. The code does not compile.
b. The code compiles cleanly and shows "Object Version".
c. The code compiles cleanly and shows "String Version".
d. The code throws an Exception at Runtime.
Answer:c
Q79
What is the result of attempting to compile the following program
1. public class Test {
2. public void method(StringBuffer sb) {
3. System.out.println("StringBuffer Verion");
4. }
5. public void method(String s) {
6. System.out.println("String Version");
7. }
8. public static void main(String args[]) {
9. Test test = new Test();
10. test.method(null);
11. }
12. }
Select one correct answer
a. The code does not compile.
b. The code compiles correctly and shows "StringBuffer Version".
c. The code compiles correctly and shows "String Version".
d. The code throws an Exception at Runtime
Answer:a.
请详细解释:
What is the result of attempting to compile and run the following program
1. public class Test {
2. public void method(Object o) {
3. System.out.println("Object Version");
4. }
5. public void method(String s) {
6. System.out.println("String Version");
7. }
8. public static void main(String args[]) {
9. Test test = new Test();
10. test.method(null);
11. }
12. }
Select one correct answer
a. The code does not compile.
b. The code compiles cleanly and shows "Object Version".
c. The code compiles cleanly and shows "String Version".
d. The code throws an Exception at Runtime.
Answer:c
Q79
What is the result of attempting to compile the following program
1. public class Test {
2. public void method(StringBuffer sb) {
3. System.out.println("StringBuffer Verion");
4. }
5. public void method(String s) {
6. System.out.println("String Version");
7. }
8. public static void main(String args[]) {
9. Test test = new Test();
10. test.method(null);
11. }
12. }
Select one correct answer
a. The code does not compile.
b. The code compiles correctly and shows "StringBuffer Version".
c. The code compiles correctly and shows "String Version".
d. The code throws an Exception at Runtime
Answer:a.
请详细解释:
...全文
相关推荐
fireworks视频教程1
关于fireworks的基本教程,很适合初学者
Fireworks8视频教程网站设计视频教程1_shipin_
视频教程,是作网站使用的,很清晰的,需要者请下载。
Fireworks8视频教程网站设计视频教程2-5_shipin_
视频教程
Fireworks8视频教程网站设计视频教程2-9_shipin_
视频教程
酷创意王磊fireworksCS4视频教程
资源名称:酷创意王磊fireworks CS4视频教程 教程内容:【】fireworks CS4视频教程1【】fireworks CS4视频教程2【】fireworks CS4视频教程3【】fireworks CS4视频教程4【】fireworks CS4视频教程5【】fireworks CS4视频教程6【】fireworks 资源太大,传百度网盘了,链接在附件中,有需要的同学自取。


Java SE
