3.1 一个简单的Java应用程序
public class FirstSample
{
public static void main(String[] args)
{
System.out.println("We will not use 'Hello, World! "') ;
}
}
3.2 注释
/**
* This is the first sample program in Core Java Chapter 3
* @version 1.01 1997-03-22
* @author Gary Cornell
*/
public class FirstSample
{
public static void main(String[] args)
{
System.out.println("We will not use 'Hello, World!'");
}
}
3.3 数据类型
3.3.1 整型
3.2.2 浮点类型
3.3.3 char 类型
3.3.4 Unicode和char类型
3.3.5 boolean 类型
3.4 变量
3.4.1 变量初始化
3.4.2 常量
3.5 运算符
3.4.1 数学函数与变量
3.5.2 数值类型之间的转换
3.5.3 强制类型转换
3.5.9 枚举类型
3.6 字符串
3.6.1 子串
3.6.2 拼接
3.6.3 不可变字符串
3.6.4 检测字符串是否相等
3.6.5 空串与Null串
3.6.6 码点与代码单元
3.6.7 String API
3.6.9 构建字符串
3.7 输入输出
3.7.1 读取输入
3.7.2 格式化输出
3.7.3 文件输入与输出
3.8 控制流程
3.8.1 块作用域
3.8.4 确定循环
3.8.5 多重选择:switch语句
3.8.6 中断控制流程语句
3.9 大数值