Какие варианты кода не приведут к ошибке компиляции?
(Ответ считается верным, если отмечены все правильные варианты ответов.)
Варианты ответа
public class SomeClass { public SomeClass(int x, int y) { super(); this.x = x; this.y = y; } public SomeClass() { super(); this(0, 0); } int x, y; }
public class SomeClass { public SomeClass(int x, int y) { super(); this.x = x; this.y = y; } int x, y; }(Верный ответ)
public class SomeClass { public SomeClass(int x, int y) { this.x = x; this.y = y; super(); } int x, y; }
public class SomeClass { public SomeClass(int x, int y) { this(x, y); } int x, y; }
public class SomeClass { public SomeClass(int x, int y) { super(); this.x = x; this.y = y; } public SomeClass() { this(0, 0); } int x, y; }(Верный ответ)