Java MCQ Questions for Placement - Set 3

1)   Garbage collection only occurs sporadically during the execution of your program

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


2)   Which driver uses ODBC driver to connect to the database?

a. JDBC-ODBC bridge driver
b. Native - API driver
c. Network Protocol driver
d. Thin driver
Answer  Explanation 

ANSWER: JDBC-ODBC bridge driver

Explanation:
No explanation is available for this question!


3)   In HTTP Request method Get request is secured because data is exposed in URL bar

a. True
b. False
Answer  Explanation 

ANSWER: False

Explanation:
No explanation is available for this question!


4)   How many techniques are used in Session Tracking?

a. 4
b. 3
c. 2
d. 5
Answer  Explanation 

ANSWER: 4

Explanation:
No explanation is available for this question!


5)   Which of these simplifies an Object Relational Mapping tool?

a. Data creation
b. Data manipulation
c. Data access
d. All mentioned above
Answer  Explanation 

ANSWER: All mentioned above

Explanation:
No explanation is available for this question!


6)   The struts 2 framework is used to develop MVC-based web application

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


7)   Which middleware services are provided by EJB?

a. Security
b. Transaction Management
c. Both A & B
d. None of the above
Answer  Explanation 

ANSWER: Both A & B

Explanation:
No explanation is available for this question!


8)   In RMI which layer defines and supports the invocation semantics of the RMI connection and this layer maintains the session during the method call?

a. The Stub & Skeleton Layer
b. The Application Layer
c. The Remote Reference Layer
d. The Transport Layer
Answer  Explanation 

ANSWER: The Remote Reference Layer

Explanation:
No explanation is available for this question!


9)   A JSP page consists of which tags?

a. HTML tags
b. JSP tags
c. Both A & B
d. None of the above
Answer  Explanation 

ANSWER: Both A & B

Explanation:
No explanation is available for this question!


10)   The JDBC API is what allows access to a data source from a Java middle tier

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


11)   Which is invoked after the init() method or browser is maximized?

a. public void start()
b. public void paint(Graphics g)
c. Public void stop()
d. Public void init()
Answer  Explanation 

ANSWER: public void start()

Explanation:
No explanation is available for this question!


12)   Which class provides many methods for graphics programming?

a. java.awt
b. java.Graphics
c. java.awt.Graphics
d. None of the above
Answer  Explanation 

ANSWER: java.awt.Graphics

Explanation:
No explanation is available for this question!


13)   StringTokenizer implements the Enumeration interface

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


14)   What does the java.net.InetAddress class represent?

a. Socket
b. IP Address
c. Protocol
d. MAC Address
Answer  Explanation 

ANSWER: IP Address

Explanation:
No explanation is available for this question!


15)   Datagram is basically an information but there is no guarantee of its content, arrival or arrival time.

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


16)   Which allows you to define one interface and have multiple implementations?

a. Encapsulation
b. Inheritance
c. Polymorphism
d. None of the above
Answer  Explanation 

ANSWER: Polymorphism

Explanation:
No explanation is available for this question!


17)   Which data type has this Minimum and Maximum value from 3.4e-038 to 3.4e+038?

a. long
b. Int
c. Byte
d. Float
Answer  Explanation 

ANSWER: Float

Explanation:
No explanation is available for this question!


18)   The CharArrayWriter class is not used to write data to multiple files

a. True
b. False
Answer  Explanation 

ANSWER: False

Explanation:
No explanation is available for this question!


19)   Many threads at a time can run in a single process

a. True
b. False
Answer  Explanation 

ANSWER: False

Explanation:
No explanation is available for this question!


20)   Which containers are used to keep the class name space compartmentalized?

a. Packages
b. Applet
c. Browser
d. None of the above
Answer  Explanation 

ANSWER: Packages

Explanation:
No explanation is available for this question!


21)   Which method compares the given object to 'this' object?

a. public boolean equals(Object obj)
b. public final void notifyAll()
c. public final void notify()
d. public final ClassgetClass()
Answer  Explanation 

ANSWER: public boolean equals(Object obj)

Explanation:
No explanation is available for this question!


22)   Exception Handling is a mechanism to handle runtime errors

a. True
b. False
Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


23)   Which is a non-static method having the same name as its class?

a. Field
b. Method
c. Constructor
d. None of the above
Answer  Explanation 

ANSWER: Constructor

Explanation:
No explanation is available for this question!


24)   If a class has multiple methods by same name but different parameters, it is known as?

a. Constructor overloading
b. Method overloading
c. Operator overloading
d. None of these
Answer  Explanation 

ANSWER: Method overloading

Explanation:
No explanation is available for this question!


25)   Local inner class can access non-final local variable

a. True
b. False
Answer  Explanation 

ANSWER: False

Explanation:
No explanation is available for this question!


26)   Which of the following JDBC drivers is known as a partially java driver?

a. JDBC-ODBC bridge driver
b. Native-API driver
c. Network Protocol driver
d. Thin driver
Answer  Explanation 

ANSWER: Native-API driver

Explanation:
No explanation is available for this question!


27)   Which are the examples of Application Server?

a. Apache
b. Tomcat
c. JBoss
d. Weblogic
e. Both C & D
Answer  Explanation 

ANSWER: Both C & D

Explanation:
No explanation is available for this question!


28)   Hibernate is an?

a. Open Source
b. Lightweight
c. ORM
d. All mentioned above
Answer  Explanation 

ANSWER: All mentioned above

Explanation:
No explanation is available for this question!


29)   How many core components does the Model-View-Controller pattern in Struts2 have?

a. 4
b. 5
c. 6
d. 3
Answer  Explanation 

ANSWER: 5

Explanation:
No explanation is available for this question!


30)   Which type of instances retain no data or conversational state for a specific client?

a. Message-Driven Bean
b. Session Bean
c. Entity Bean
d. None of the above
Answer  Explanation 

ANSWER: Message-Driven Bean

Explanation:
No explanation is available for this question!