public static void main(String[] args) { Father f = new Father(); f.fathMathod(); Father fs = new Son(); fs.fathMathod(); Son son = new Son(); son.fathMathod(); son.sonMathod(); System.out.println(son.father); /** 子类的对象不具有父类的私有的属性或方法 */ // System.out.println(son.prifat); /** 子类的对象不可以由父类产生 */ // Son sf = (Son) new Father(); // sf.fathMathod(); // sf.sonMathod(); double d = 8.0934d; int i = (int) d; int ii = 4; double dd = ii; Integer integer = new Integer(5); Double double1 = new Double(integer); System.out.println(d); System.out.println(i); System.out.println(dd); System.out.println(double1); }