// class 表示类的意思,是一个关键字
// ABC表示的是类名
// public class 类名必须于文件名保持一致
// 一个java文件,可以有多个类,但是public修饰的类只能有一个,并且名字必须和文件名保持一致
// main方法是一个类执行的入口,代码从main方法的第一行开始执行
/*
我就是多行注释,oh yeah!
ABC,主要用于上传文件
Author: ccq Date:2019.3.6
*/
class ABC {
//main 方法就是主方法,一个字都能错
public static void main(String[] args){
System.out.println("hello world!"); //控制台打印输出语句
System.out.println("hello TOM!");
System.out.print("hello TOM!"); // print 打印不换行,println 打印并换行,printf 不换行
// String name ="三点一丝";
// System.out.printf("pai的数值是%s",name);
System.out.printf("pai的数值是%.2f",3.141); // %.2f 的意思是后面的数字精确到小数点后两位
System.out.printf("数值是%d",2); // 2
System.out.printf("数值是%02d",5); // %02d 表示一个数字如果不够两位,前面补零,如果够两位,原样输出
}
}