1
编译错误,main方法不能调用非static的变量
如果这样修改下
public class Test52 {
static String str1 = "Hello, Java world! t";
static String str2 = "Hello, students!";
public static void main(String args[]) {
System.out.print(str1);
System.out.println(str2);
}
}
结果是
Hello, Java world! Hello, students!
2
*
* *
* * *
* * * *
* * * * *
3
x>y==false
z>w==true