因为没有写public static void mian(String[] args) 在类里面只有属性和方法,内部类。不能直接写System.out.println(); 转载于:https://www.cnblogs.com/wth21-1314/p/6350111.html