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.

51.

The flush() method of PrintStream class flushes any uncleared buffers in memory

A. True
B. False
Answer» B. False
52.

The i18n interceptor provides multi-lingual support for your application

A. True
B. False
Answer» B. False
53.

In RMI Distributed object applications need to

A. Locate remote objects
B. Communicate with remote objects
C. Load class definitions for objects that are passed around
D. All mentioned above
Answer» E.
54.

In how many states Threads can be explained ?

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

Which of the following ways specify/ies to load the class files in temporary?

A. By setting the classpath in the command prompt
B. By classpath switch
C. Both A & B
D. None of the above
Answer» D. None of the above
56.

What defines the method by which you can enumerate (obtain one at a time) the elements in a collection of objects?

A. Stack class
B. Bitset class
C. Enumeration interface
D. None of the above
Answer» D. None of the above
57.

In which application can XML be used for marking up documents for specialized applications, such as e-commerce, scientific documents, Mathematical formula and e-books?

A. Data exchange between computer systems
B. Data storage
C. Specialized publishing
D. None of the above
Answer» D. None of the above
58.

JSP’s provide better facilities for separation of page code and template data by mean of Java beans, EJBs and custom tag libraries

A. True
B. False
Answer» B. False
59.

Constructor is like a method that is used to initialize the state of an object. It is invoked at the time of object creation

A. True
B. False
Answer» B. False
60.

Which specification that provides runtime environment in which java byte code can be executed?

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

Which is a perfect example of runtime polymorphism?

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

Which method returns an enumeration of the values contained in the dictionary?

A. Enumeration elements()
B. Enumeration keys()
C. Enumeration propertyNames()
D. None of the above
Answer» B. Enumeration keys()
63.

Which services are provided to EJB components by the EJB container?

A. Transaction support
B. Persistence support
C. Naming support
D. All mentioned above
Answer» E.
64.

URL stands for Uniform Resource Locator and represents a resource on the World Wide Web, such as a Web page or FTP directory.

A. True
B. False
Answer» B. False
65.

Drivers that are JDBC Compliant should normally support scrollable result sets, but they are not required to do so.

A. True
B. False
Answer» B. False
66.

XML is ?

A. Platform Independent
B. Language Independent
C. Both A & B
D. None of the above
Answer» D. None of the above
67.

The Java Foundation Classes (JFC) is a set of GUI components which simplify the development of desktop applications.

A. True
B. False
Answer» B. False
68.

Which attribute specifies a JSP page that should process any exceptions thrown but not caught in the current page?

A. The ErrorPage Attribute
B. The IsErrorPage Attribute
C. Both A & B
D. None of the above
Answer» B. The IsErrorPage Attribute
69.

Which case of a session bean obtains the UserTransaction object via the EJBContext using the getUserTransaction() method in EJB transaction management?

A. Bean-managed transactions
B. Container-managed transactions
C. Container-managed transactions
D. None of the above
Answer» B. Container-managed transactions
70.

In RMI Architecture which layer Intercepts method calls made by the client/redirects these calls to a remote RMI service?

A. Stub & Skeleton Layer
B. Application Layer
C. Remote Reference Layer
D. Transport Layer
Answer» B. Application Layer
71.

Which is an object, acts as a gateway for the client side, all the outgoing requests are routed through it and it resides at the client side and represents the remote object?

A. Stub
B. Skeleton
C. Both A & B
D. None of the above
Answer» B. Skeleton
72.

Spring framework provides an difficult way to manage the dependency, It cannot be easily integrated with struts 2 framework.

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

In order to transfer data between a database and an application written in the Java programming language, the JDBC API provides which of these methods?

A. Methods on the ResultSet class for retrieving SQL SELECT results as Java types.
B. Methods on the PreparedStatement class for sending Java types as SQL statement parameters.
C. Methods on the CallableStatement class for retrieving SQL OUT parameters as Java types.
D. All mentioned above
Answer» E.
74.

A message driven bean is like statefull session bean that encapsulates the business logic and doesn't maintain state.

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

Abbreviate the term UDA?

A. Unified Data Access
B. Universal Data Access
C. Universal Digital Access
D. Uniform Data Access
Answer» C. Universal Digital Access
76.

Abbreviate the term JMS?

A. Java Message Service
B. Java Monitor Service
C. Java Message Session
D. Java Monitor Session
Answer» B. Java Monitor Service
77.

Java supports RMI, RMI Stands for?

A. Random Method Invocation
B. Remote Memory Interface
C. Remote Method Invocation
D. Random Method Invocation
Answer» D. Random Method Invocation
78.

EJB QL is a Query Language provided for navigation across a network of enterprise beans and dependent objects defined by means of container managed persistence.

A. True
B. False
Answer» B. False
79.

How many Result sets available with the JDBC 2.0 core API?

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

Which method Drops all changes made since the previous commit/rollback?

A. public void rollback()
B. public void commit()
C. public void close()
D. public Statement createStatement()
Answer» B. public void commit()
81.

Abbreviate the term DGC?

A. Digital Garbage Collection
B. Distributed Garbage Collection
C. Distributed Garbage Connection
D. None of the above
Answer» C. Distributed Garbage Connection
82.

An RMI Server is responsible for _______

A. Creating an instance of the remote object
B. Exporting the remote object
C. Binding the instance of the remote object to the RMI registry
D. All mentioned above
Answer» E.
83.

Which Error Handling in Java handles runtime errors with exceptions, If an exception is not caught in your JSP or Servlet, Resin will use a special error page to send results back to the browser, Resin uses a default error page unless you explicitly provide an error page yourself?

A. Client Request Time Processing Errors
B. Compilation Time Processing Errors
C. JSP Translation Time Processing Errors
D. None of the above
Answer» B. Compilation Time Processing Errors
84.

ResultSetMetaData interface is useful because it provides methods to get metadata from the ResultSet object.

A. True
B. False
Answer» B. False
85.

Which constructor creates an empty string buffer with the specified capacity as length.

A. StringBuffer()
B. StringBuffer(String str)
C. StringBuffer(int capacity)
D. None of the above
Answer» D. None of the above
86.

Which method can set or change the text in a Label?

A. setText()
B. getText()
C. All the above
D. None of the above
Answer» B. getText()
87.

Which method is used to set the graphics current color to the specified color in the graphics class?

A. public abstract void setFont(Font font)
B. public abstract void setColor(Color c)
C. public abstract void drawString(String str, int x, int y)
D. None of the above
Answer» C. public abstract void drawString(String str, int x, int y)
88.

Which is used for reading streams of raw bytes such as image data and for reading streams of characters, consider using FileReader?

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

An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions.

A. True
B. False
Answer» B. False
90.

JMS is mainly used to send and receive message from one application to another.

A. True
B. False
Answer» B. False
91.

Give the abbreviation of AWT?

A. Applet Windowing Toolkit
B. Abstract Windowing Toolkit
C. Absolute Windowing Toolkit
D. None of the above
Answer» C. Absolute Windowing Toolkit
92.

Switch is more efficient than nested if or if - else in java.

A. True
B. False
Answer» B. False
93.

Connection Pooling Class manages no of user requests for connections to improve the performance.

A. True
B. False
Answer» B. False
94.

Which session bean maintain their state between client invocations but are not required to maintain their state across server crashes or shutdowns?

A. Stateful Session Bean
B. Stateless Session Bean
C. Singleton Session Bean
D. None of the above
Answer» D. None of the above
95.

Which class is used to uncompress the file in the deflate compression format, It provides facility to the other uncompression filters?

A. DeflaterOutputStream class
B. InflaterInputStream class
C. Both A & B
D. None of the above
Answer» C. Both A & B
96.

Which Exception occurs when a class is not found while dynamically loading a class using the class loaders?

A. ClassNotFoundException
B. ClassFoundException
C. NoClassDefFoundError
D. ClassDefFoundError
Answer» B. ClassFoundException
97.

Which method is used to change the name of a thread?

A. public String getName()
B. public void setName(String name)
C. public void getName()
D. public String setName(String name)
Answer» C. public void getName()
98.

Which can generate HTML dynamically on the client but can hardly interact with the web server to perform complex tasks like database access and image processing etc. in JSP?

A. vs.Static HTML
B. vs.Server-Side Includes
C. vs.Pure Servlets
D. Vs.JavaScript
Answer» E.
99.

A package can be renamed without renaming the directory in which the classes are stored.

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

What is known as the classes that extend Throwable class except RuntimeException and Error?

A. Checked Exception
B. Unchecked Exception
C. Error
D. None of the above
Answer» B. Unchecked Exception