super-constructor if there is no super class?
问题 I found a class like this: public class Computer implements Serializable { private static final long serialVersionUID = 1L; //... public Computer() { super(); } //... } Can someone explain me, how this works? The class isn't inheriting any super class and there could still be "super();" in the constructor? 回答1: By default all classes inherit java.lang.Object . So a hidden code in your class is public class Computer extends java.lang.Object implements Serializable { private static final long