Explore topic-wise MCQs in Placement Tests.

This section includes 765 Mcqs, each offering curated multiple-choice questions to sharpen your Placement Tests knowledge and support exam preparation. Choose a topic below to get started.

201.

The following two rules are defined by? 1. The parameters may differ in their type or number, or in both. 2. They may have the same or different return types.

A. Method overloading
B. Method overriding
C. Constructor overloading
D. None of the above
Answer» B. Method overriding
202.

In Method overriding a subclass in a different package can only override the non-final methods declared public or protected

A. True
B. False
Answer» B. False
203.

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

A. Encapsulation
B. Inheritance
C. Polymorphism
D. None of the above
Answer» D. None of the above
204.

Which is used for writing data to a file in file handling?

A. FileInputStream
B. FileOutputStream
C. Both A & B
D. None of the above
Answer» C. Both A & B
205.

In which state is the thread after invocation of start() method, but the thread Scheduler has not selected it to be the running thread?

A. Running
B. Runnable
C. Terminated
D. Non-Runnable
Answer» C. Terminated
206.

Which one of the following scopes does the attribute in servlet is an object that can be set, get or removed?

A. session scope
B. request scope
C. application scope
D. All mentioned above
Answer» E.
207.

Constructor does not perform other tasks instead of initialization

A. True
B. False
Answer» C.
208.

Which package is used for analyzing code during run time?

A. java.lang.reflect
B. java.awt
C. java.io
D. java.applet
Answer» B. java.awt
209.

The JDK forms an extended subset of a software development kit (SDK)

A. True
B. False
Answer» B. False
210.

Which mechanism is provided to handle the runtime errors so that normal flow of the application can be maintained?

A. Exception Handling
B. String Handling
C. Event Handling
D. None of the above
Answer» B. String Handling
211.

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

A. True
B. False
Answer» B. False
212.

Which Characters are illegal in XML elements?

A. " < "
B. "&"
C. Both A & B
D. None of the above
Answer» D. None of the above
213.

Which middleware services are provided by EJB?

A. Security
B. Transaction Management
C. Both A & B
D. None of the above
Answer» D. None of the above
214.

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» D. The Transport Layer
215.

A JSP page consists of which tags?

A. HTML tags
B. JSP tags
C. Both A & B
D. None of the above
Answer» D. None of the above
216.

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

A. True
B. False
Answer» B. False
217.

Many threads at a time can run in a single process

A. True
B. False
Answer» C.
218.

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

A. True
B. False
Answer» C.
219.

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» E.
220.

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

A. Packages
B. Applet
C. Browser
D. None of the above
Answer» B. Applet
221.

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

A. 4
B. 5
C. 6
D. 3
Answer» C. 6
222.

Which are the examples of Application Server?

A. Apache
B. Tomcat
C. JBoss
D. Weblogic
E. Both C & D
Answer» F.
223.

XML is designed to store data and _____.

A. Design
B. Verify
C. Transport
D. Both A & B
Answer» D. Both A & B
224.

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» B. Session Bean
225.

The Following steps are required to perform (1) Implement the Listener interface and overrides its methods (2) Register the component with the Listener

A. Exception Handling
B. String Handling
C. Event Handling
D. None of the above
Answer» D. None of the above
226.

Which are the XML Syntax rules?

A. All XML Elements Must Have a Closing Tag
B. XML Tags are not Case Sensitive
C. XML Elements Must be Properly Nested
D. Both A & C
Answer» E.
227.

XML documents must contain a root element; this element is "the parent" of all other elements

A. True
B. False
Answer» B. False
228.

The URLConnection class can be used to read and write data to the specified resource referred by the URL

A. True
B. False
Answer» B. False
229.

The client in socket programming must know which informations?

A. IPaddress of Server
B. Port number
C. Both A & B
D. None of the above
Answer» D. None of the above
230.

Which type of java package that contains wide range of classes and methods are used for performing different functionalities?

A. User Defined Package
B. Java System Packages
C. User System Packages
D. None of the above
Answer» C. User System Packages
231.

Find whether these two rules are correct or not defined by the constructor 1. Constructor name must be same as its class name. 2. Constructor must have no explicit return type.

A. True
B. False
Answer» B. False
232.

Which driver converts JDBC calls directly into the vendor-specific database protocol?

A. Native - API driver
B. Network Protocol driver
C. Thin driver
D. Both B & C
Answer» D. Both B & C
233.

Which are also known as inner classes?

A. Non-static nested class
B. Static nested class
C. Nested class
D. None of the above
Answer» B. Static nested class
234.

Which classes are used for connection-less socket programming?

A. DatagramSocket
B. DatagramPacket
C. Both A & B
D. None of the above
Answer» D. None of the above
235.

When an applet begins, in which sequence will the AWT call the methods?

A. init(),paint(),start()
B. Start(),paint(),init()
C. intit(),start(),paint()
D. paint(),start(),init()
Answer» D. paint(),start(),init()
236.

Void is not a wrapper class

A. True
B. False
Answer» B. False
237.

Package does not provide access protection

A. True
B. False
Answer» C.
238.

Which type of polymorphism is nothing but the method overloading in java?

A. Compile time polymorphism
B. Runtime polymorphism
C. Static polymorphism
D. Both A & C
Answer» E.
239.

Which class can be used to read data line by line using the readLine() method?

A. BufferedReader
B. InputStreamReader
C. DataInputStream
D. None of the above
Answer» B. InputStreamReader
240.

Which is nothing but a blueprint or a template for creating different objects which defines its properties and behaviours?

A. An Array
B. A class
C. Interface
D. None of the above
Answer» C. Interface
241.

XML is the most common tool for data transmissions between all sorts of applications

A. True
B. False
Answer» B. False
242.

Generally string is a sequence of characters, But in java, string is an _______.

A. Object
B. Class
C. Package
D. None of the above
Answer» B. Class
243.

Which block contains a block of program statements where an exception might occur?

A. Catch
B. try
C. throw
D. final
Answer» C. throw
244.

In JSP how many ways are there to perform exception handling?

A. 3
B. 2
C. 4
D. 5
Answer» C. 4
245.

Which JDBC drivers will run your program?

A. The JDBC-ODBC bridge
B. The JDBC driver manager
C. The JDBC driver test suite
D. None of the above
Answer» D. None of the above
246.

Which package provides core functionality?

A. java.net
B. java.rmi
C. java.lang
D. java.math
Answer» D. java.math
247.

Which is a software- and hardware-independent tool for carrying information?

A. HTML
B. XML
C. Both A & B
D. None of the above
Answer» C. Both A & B
248.

Which class is used to create servers that listen for either local client or remote client programs?

A. ServerSockets
B. httpServer
C. httpResponse
D. None of the above
Answer» B. httpServer
249.

Which method is used to suspend threads that don’t need to run when the applet is not visible?

A. destroy()
B. paint()
C. stop()
D. start()
Answer» D. start()
250.

Which internet language is used for describing available web services in XML?

A. WSDL
B. RSS
C. RDF
D. OWL
Answer» B. RSS