1 What is true of an interface?
2 Given the following class declarations:
public interface Inter {...} public class Class1 implements Inter {...} public class Class2 extends Class1 {...}
Which of the following statements are illegal?
3 If a class has no default constructor, what are the consequences?
4 Given the following class definition:
public class A {
}
What is wrong with the following subclass:
public class AB extends A {
5 There are empty interfaces. They are used to make a class member of a set and are called marker interfaces, e.g. interface Marker { }.What is wrong with the following class?
class MyClass extends SomeClass implements Marker { }