读下面程序,给出编号语句的注释,最后屏幕输出结果。
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);
}
}