问答题 Java程序设计编程题:读下面程序,给出编号语句的注释,最后屏幕输出结果。public class Assign { public static void main (String args[ ]) { int x, y; //1 float z=3.414f ; //声明并赋值float型变量 double w=3.1415; //声明并赋值double型变量 boolean truth=true; //声明并赋值boolean型变量 char c; //声明字符变量 String str; /

成人教育远程网络教育函授网上考试【Java程序设计】课程在线考试模拟试题正确答案解析,免费查看【Java程序设计】作业答案。
题目内容:
Java程序设计编程题:读下面程序,给出编号语句的注释,最后屏幕输出结果。public class Assign { public static void main (String args[ ]) { int x, y; //1 float z=3.414f ; //声明并赋值float型变量 double w=3.1415; //声明并赋值double型变量 boolean truth=true; //声明并赋值boolean型变量 char c; //声明字符变量 String str; //2 String str1="bye"; //声明并赋值string类变量 c='A'; //3 str="Hi out there"; //给string变量赋值 x=6; y=1000; //给int型变量赋值System.out.println("x="+x); System.out.println("y="+y); System.out.println("z="+z); System.out.println("w="+w); System.out.println("truth="+truth); System.out.println("c="+c); System.out.println("str="+str); System.out.println("str1="+str1); }}
题目选项
编程题:读下面程序,给出编号语句的注释,最后屏幕输出结果。public class Assign { public static void main (String args[ ]) { int x, y; //1 float z=3.414f ; //声明并赋值float型变量 double w=3.1415; //声明并赋值double型变量 boolean truth=true; //声明并赋值boolean型变量 char c; //声明字符变量 String str; //2 String str1="bye"; //声明并赋值string类变量 c='A'; //3 str="Hi out there"; //给string变量赋值 x=6; y=1000; //给int型变量赋值System.out.println("x="+x);System.out.println("y="+y);System.out.println("z="+z);System.out.println("w="+w);System.out.println("truth="+truth);System.out.println("c="+c);System.out.println("str="+str);System.out.println("str1="+str1); }}
参考答案价值:80%
已邀请:
参考答案要查看答案请先登录注册

要回复问题请先登录注册