II. Each Question Carries 2 Mark.
1) Java is providing an excellent key worked_____________, which allow to implement Interface methods in derived class.
a) extends b) implements c) Both d) None
2) An interface look like bit of class is counted as a reference type, and can generally be used in a lot of the same places as a class. An interface can not be instantiated as we do for classes.
a) False b) True
3) An interface does not have behavior. It’s just a description of promised behavior. You can declare only constant data in interface
a) False b) True
4) If you implement some of methods in class from interface then that class must become as ………………….
a) General class b) abstract class c) interface d) none
5) Interface can be used to mix in generally useful constants, if interfaces define a set of constants and then multiple classes use those constants, the values of those constants could be globally changed without having to modify multiple classes.
a) False b) True
6) interface A { void aa();
interface B implements A{ ….}
a) Error b) Complies successfully c) Runtime error d) None
7). The inner class name is not usable outside of the class, except perhaps in a qualified name. It helps in strutting the classes
with in a package.
a) False b) True
1) Which is not inner class
a) Interface b) Local c) Member d) Anonymous
e) None
2) The nested class is accessible to all other top-level classes thought its enclosing class. Hence this is not an inner class but a new kind of ___________class.
a) Local b) Member c) Top level d) None
3) They differ from inner classes in that a top-level class can make direct use only of its own ______variables.
a) Instance b) local c) object d) None
11 ) Nested classes can be declared _______________ just like other members, Access Protection protects against classes
outside the enclosing class.
a) Private b) public c) protected d) all
1) A member class look like exactly ___________ class with the key word static removed. That it is the class appears in every instance of it enclosing class. Just as any member in a class.
a) Local b) anonymous c) nested top level d) None
II. Answer – 2 Mark.
1. B 2.B 3.B 4.B 5.B 6.A 7.B
8.A 9. C 10. A 11. D 12. C