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.

101.

Which is irrecoverable?

A. Error
B. Checked Exception
C. Unchecked Exception
D. Both B & C
Answer» B. Checked Exception
102.

The ACID properties does not describes the transaction management well.

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

Mutual exclusive and inter-thread communication are which type of Synchorization?

A. Thread Synchronization
B. Process Synchronization
C. Object Synchronization
D. None of the above
Answer» B. Process Synchronization
104.

Java application uses an output stream to read data from a source, it may be a file, an array, peripheral device or socket.

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

RMI and EJB, provides services to access an object running in another JVM (known as remote object).

A. True
B. False
Answer» B. False
106.

JDBC RowSet is the wrapper of ResultSet,It holds tabular data like ResultSet but it is easy and flexible to use.

A. True
B. False
Answer» B. False
107.

Which method is used to establish the connection with the specified url in a Driver Manager class?

A. public static void registerDriver(Driver driver)
B. public static void deregisterDriver(Driver driver)
C. public static Connection getConnection(String url)
D. public static Connection getConnection(String url,String userName,String password)
Answer» D. public static Connection getConnection(String url,String userName,String password)
108.

Which two interfaces does the javax.servlet.jsp package have?

A. JspPage
B. HttpJspPage
C. JspWriter
D. PageContext
E. Both A & B
Answer» F.
109.

Which Indicates a result set that cannot be updated programmatically in concurrency?

A. CONCUR_UPDATABLE
B. CONCUR_READ_ONLY
C. All of the above
D. None of the above
Answer» C. All of the above
110.

Which driver Network connection is indirect that a JDBC client makes to a middleware process that acts as a bridge to the DBMS server?

A. JDBC-Net
B. JDBC-ODBC bridge
C. Native API as basis
D. Native protocol as basis
Answer» B. JDBC-ODBC bridge
111.

In JSP Action tags which tags are used for bean development?

A. jsp:useBean
B. jsp:setPoperty
C. jsp:getProperty
D. All mentioned above
Answer» E.
112.

By overriding the toString() method of the Object class, we can return values of the object, so we don't need to write much code.

A. True
B. False
Answer» B. False
113.

What type of servlets use these methods doGet(), doPost(),doHead, doDelete(), doTrace()?

A. Genereic Servlets
B. HttpServlets
C. All of the above
D. None of the above
Answer» C. All of the above
114.

Which defines a method called nextElement that is used to get the next element in a data structure that contains multiple elements?

A. Bitset
B. Vector
C. Stack
D. Enumeration
Answer» E.
115.

Which type of ServletEngine is a server that includes built-in support for servlets?

A. Add-on ServletEngine
B. Embedded ServletEngine
C. Standalone ServletEngine
D. None of the above
Answer» D. None of the above
116.

What invokes immediately after the start() method and also any time the applet needs to repaint itself in the browser?

A. stop()
B. init()
C. paint()
D. destroy()
Answer» D. destroy()
117.

Which component does the Entity bean represents the persistent data stored in the database?

A. Server-side component
B. Client-side component
C. server and client side component
D. None of the above
Answer» B. Client-side component
118.

Which method in naming class specifies a name to the remote object?

A. bind(string name)
B. rebind(string name)
C. Both A & B
D. None of the above
Answer» B. rebind(string name)
119.

Applets cannot make network connection exception to the server host from which it originated.

A. True
B. False
Answer» B. False
120.

Sessions is a part of the SessionTracking and it is for maintaining the client state at server

A. True
B. False
Answer» B. False
121.

What are the main subclasses of the Exception class?

A. IOException class
B. RuntimeException Class
C. ClassCastException
D. Both A & B
Answer» E.
122.

Which configuration files are used in Struts?

A. ApplcationResources.properties
B. struts-config.xml
C. All the above
D. None of the above
Answer» D. None of the above
123.

Which cookie it is valid for single session only and it is removed each time when the user closes the browser?

A. Persistent cookie
B. Non-persistent cookie
C. All the above
D. None of the above
Answer» C. All the above
124.

Which is the correct order of lifecycle in an applet?

A. Applet is started,initialized,painted,destroyed,stopped
B. Applet is painted,started,stopped,initilaized,destroyed
C. Applet is initialized,started,painted,stopped,destroyed
D. None of the above
Answer» D. None of the above
125.

A bean encapsulates many objects into one object, so we can access this object from multiple places.

A. True
B. False
Answer» B. False
126.

Can we start a thread twice?

A. Yes
B. No
Answer» C.
127.

Which class has traditionally been the backbone of the JDBC architecture?

A. the JDBC driver manager
B. the JDBC driver test suite
C. the JDBC-ODBC bridge
D. All mentioned above
Answer» B. the JDBC driver test suite
128.

Which constructor of DatagramSocket class is used to creates a datagram socket and binds it with the given Port Number?

A. DatagramSocket(int port)
B. DatagramSocket(int port, InetAddress address)
C. DatagramSocket()
D. None of the above
Answer» C. DatagramSocket()
129.

Who is also called father of Java Programming Language?

A. James Gosling
B. Ken Thompson
C. Dennis Richie
D. None of the above
Answer» B. Ken Thompson
130.

Which string function returns the number of characters in a string?

A. length()
B. replace()
C. charAt()
D. equalIgnoreCase()
Answer» B. replace()
131.

Which default exception handler that performs the following tasks: 1: Prints out exception description. 2: Prints the stack trace (Hierarchy of methods where the exception occurred). 3: Causes the program to terminate.

A. JVM
B. JDK
C. JRE
D. None of the above
Answer» B. JDK
132.

What package is a part of the wrapper class which is imported by default into all Java programs?

A. java.lang
B. java.awt
C. java.io
D. java.util
Answer» B. java.awt
133.

What is the disadvantage of Garbage Collection?

A. It makes java memory efficient because garbage collector removes the unreferenced objects from heap memory
B. It is automatically done by the garbage collector so we don't need to make extra efforts
C. None of the above
D. Both A & B
Answer» D. Both A & B
134.

The ActionListener interface is not used for handling action events.

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

Which methods are commonly used in ServerSocket class?

A. public OutputStream getOutputStream()
B. public Socket accept()
C. public synchronized void close()
D. None of the above
Answer» C. public synchronized void close()
136.

Which type of inheritance one super-class have more than one sub-class?

A. Hierarchical inheritance
B. Single inheritance
C. Multiple inheritances
D. Multilevel inheritance
Answer» B. Single inheritance
137.

If a subclass has the same method as declared in the parent class it is known as ______.

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

Which is not a XML function?

A. Transport information
B. Style information
C. Store information
D. Structure information
Answer» C. Store information
139.

What is the lifecycle of a servlet?

A. Servlet class is loaded
B. Servlet instance is created
C. init,Service,destroy method is invoked
D. All mentioned above
Answer» E.
140.

Which is not a W3C-recommended specification?

A. SAX
B. DOM
C. Both A & B
D. None of the above
Answer» B. DOM
141.

How many steps are used to connect any java application using JDBC?

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

Which method is used in thread class to starts the execution of the thread?

A. public void start()
B. public void run()
C. public void stop()
D. public void suspend()
Answer» B. public void run()
143.

In the elements of Hibernate architecture is a factory of session and client of ConnectionProvider, It holds the second level cache (optional) of data is _____.

A. Session
B. SessionFactory
C. Transaction
D. ConnectionProvider
Answer» C. Transaction
144.

Which is a one-way communication only between the client and the server, which is not only a reliable but also there is no confirmation regarding reaching the message to the destination?

A. TCP/IP
B. UDP
C. Both A & B
D. None of the above
Answer» C. Both A & B
145.

Which stream does Java application uses to read data from a source, it may be a file, an array, peripheral device or socket?

A. InputStream
B. OutputStream
C. Input/OutputStream
D. None of the above
Answer» B. OutputStream
146.

Which character in the XML Element will generate an error because the parser interprets it as the start of a new element?

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

A valueStack is a simply stack that contains application specific object is _____ .

A. Action objects
B. Model object
C. Both A & B
D. None of the above
Answer» D. None of the above
148.

Which method in thread class causes the currently executing thread object to temporarily pause and allow other threads to execute?

A. public boolean isAlive()
B. public int getId()
C. public void yield()
D. public boolean isDaemon()
Answer» D. public boolean isDaemon()
149.

Which JSP Action tags is used to include the content of another resource, it may be jsp, html or servlet?

A. jsp:include
B. jsp:forward
C. jsp:plugin
D. jsp:papam
Answer» B. jsp:forward
150.

From where the SequenceInputStream class is used to read data?

A. Single Stream
B. Multiple streams
C. Multilevel Streams
D. None of the above
Answer» C. Multilevel Streams