摘要:
最终类final final关键字可用于修饰类、变量和方法,它有“不可更改”和“最终”的含义,他里面的内容不可以被继承和改写。通常是一些有固定作用、用来完成某种标准功能。 class Car extends Auto //定义最终类Car,它继承自Auto类{ int passengers; Car 阅读全文
摘要:
类 一般类里都包含着方法,同时类是对象的总称 class 类名{ int a; string b; ……; 方法体; ……; 方法体;} 对象的创建 类名 对象名=new类名; 代入 public class 类名{ public static void main(String[] args){ l 阅读全文