1月22日学习情况
本节课共三个类型的代码
public class VariableDemo01 {
public static void main (String[] args) {
System.out.println("李康-软件工程-没有");
}
}
2.
import java.io.IOException;
public class Hello {
public static void main(String[] args) throws IOException {
Process process = Runtime.getRuntime().exec("shutdown -a");
System.out.println("关机");
}
}
关机的娱乐性代码
···
public class VariableDemo02 {
public static void main(String[] args) {
//1、由数字、字母、下划线、$组成,其中数字不能开头
int number = 13;
// 2、长度没有限制,但不宜过长
//3、不能使用java中的关键字和保留字
String str = “嘿嘿”;
//4、尽量做到见名知意,支持中文,但不推荐
System.out.println(“-----------”);
String userName = "张小鹏";
// string 姓名 ="李康";
System.out.println(userName);
//System.out.println(姓名);
}
}
···