Object Oriented Programming through Java Mid - I, September - 2014

1.What are the pillars of OOPS concept
  • Abstraction,Inheritance, Encapsulation, Polymorphism
  • Atomicity, Inheritance, Encapsulation, Polymorphism
  • Abstraction, Inheritance, Polymorphism
  • None of the Above
Answer: A
2.___________ is a name given to a variable, class or method
  • Constant
  • Reference
  • Identifier
  • Modifier
Answer: A
3.A compiler converts the Java program into an intermediate language representation called ____________.
  • bytecode
  • byte
  • Byteclass
  • Byte java
Answer: A
4._____________ operator is used to create an object.
  • Class
  • new
  • print
  • main
Answer: B
5.Which of the following is NOT a Java Keyword?
  • Abstract
  • native
  • package
  • syncronize
Answer: B
6.A class that isinherited is called a ____________.
  • Super
  • sub
  • subset
  • relative
Answer: A
7.Which of the following is not a looping statement ________
  • For
  • switch
  • while
  • do while
Answer: B
8.An _________ determines the features of a class that may be used by other classes.
  • specifier
  • inheritance
  • implementation
  • access specifier
Answer: D
9.Which property of Java allows the creation of hierarchical classifications?
  • Inheritance
  • interface
  • robust
  • distributed
Answer: A
10.The class at the top of the exception classes’ hierarchy is called __________
  • Common
  • throwable
  • catch
  • null
Answer: B
11.A _________________ is used to initialize a newly created object.
Answer: Constructor
12.Name of constructor is same as the _______________ .
Answer: Class name
13.The Java uses the ___________________ to free the memory.
Answer: Garbage collector
14._______________ access specifiercan only be accessed within the same class to which the methods and fields belong.
Answer: Protected
15._______________ is used to trigger an exception where as throws is used in declaration of exception.
Answer: Throw
16.JVM is not platform __________________.
Answer: Indepedent
17.JVM stands for ____________________ .
Answer: Java virtual machine
18.An ___________________ object is one that we cannot change once it is created.
Answer: Immutable
19.________________ Constructor is used to pointing the current class instance.
Answer: This
20.______________Constructer is used to callconstructor of parent class.
Answer: super