Monday, October 25, 2010

Few Sample / Practice Questions for IA - 1


Q.1 A class is a description of a(n) _______ and an object is an instance of a(n) ______.

Q.2 A _____ field or method can be accessed without any instances of the class existing.

Q.3 Hiding the fields in a class by making them private is referred to as ________.

Q.4 If you do not declare a class in a package, then the class is in the _______ package.

Q.5 ____________ package never needs to be explicitly imported in a class file.

Q.6 When adding multiple constructors to a class, ___________the rules of method apply.
a) Overloading b) Overriding c) Polymorphism d) Encapsulation.

Q.7 All methods in an ______ are abstract.
a) abstract class b) interfaces c) Super Class d) Sub Class

Q.8 A(n) ______ class is a class that cannot be instantiated.
a) abstract class b) interfaces c) Both A & B d) None of the above

Q.9 A field in an interface must be declared as _______ and _______.
a) private b) protected c) final d) static e) final & static

Q.10 A try block must always be followed by exactly one corresponding catch block.
a) Yes b) No c) None of the above


Slides - Java Theory

Slides - Lab Programs