摘要:
向上转型 Person 父类 Student 子类 Student student = new Student() Person p1 = student ok Object o1 = student ok Object o2 = student ok 向下转型 Person p = new Stu 阅读全文
摘要:
public class Main { public static void main(String[] args) { double d = 3.1415926; System.out.printf("%.2f\n", d); // 显示两位小数3.14 System.out.printf("%. 阅读全文