华东师大网络程序设计平时作业讲述.doc

华东师大网络程序设计平时作业讲述

《网络程序设计》 选择题 [ 1 ] 假设有如下代码: 1. public class Colors { 2. public static void main(String args[]) { 3. int n = 1; 4. System.out.println(The Color is + args[n]); 5. } 6. } 设程序已经通过编译并生成文件Colors.class,运行以下哪一条命令会产生输出 The Color is blue? A. Colors red green blue yellow B. java Colors blue green red yellow C. java Colors green blue red yellow D. java Colors.class blue green red yellow E. java Colors.class green blue red yellow 答:C [ 2 ] 当编译和运行下列代码时会产生什么情况? 1. public class StrEq { 2. private StrEq() { 3. String s = Bob; 4. String s2 = new String(Bob); 5. if

文档评论(0)

1亿VIP精品文档

相关文档