标识符 - 命名规则 变量 常量 public class Test { public static void main(String[] args) { // 被findal修饰的变量为常量,常量不可修改。 final double PI = 3.141592657; double R = 10; double Area = PI * R * R; System.out.println("面积:" + Area); } } 关注 笔者 - jxd 微信公众号搜索 “码农总动员” 或 微信扫描下方二维码,了解更多你不知道的XX,O(∩_∩)O