题目:下面基本数据类型的变量赋值的程序,请解释带编号的语句,并写出程序的运行结果。public class Assign { public static void main (String args[ ]) { int x, y; //1 float z=3.414f ; //2 double w=3.1415; //3 boolean truth=true; //4 char c; //5 String str; //6 String str1="bye"; //7 c='A'; //8 str="Hi out there"; //9 x=6; y=1000; //10 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); }}
答案:
<查看本题扣3积分>
C:java>javac Assign..... 查看答案
问题答案不对?抱歉,搜索引擎优化导致页面变化,请尝试站内搜索,远程教育试题库