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.

651.

The following example shows which XML Syntax rule, (1) < note date=" 12/11/2007"> (2) < to>Tove< /to> (3) < from>Jani< /from> (4) < /note>

A. XML Attribute Values Must be Quoted
B. All XML Elements Must Have a Closing Tag
C. XML Tags are Case Sensitive
D. XML Elements Must be Properly Nested
Answer» B. All XML Elements Must Have a Closing Tag
652.

The following a) It is lightweight. b) It supports pluggable look and feel. c) It follows MVC (Model View Controller) architecture are the advantages of _____ .

A. Swing
B. AWT
C. Both A & B
D. None of the above
Answer» B. AWT
653.

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

A. True
B. False
Answer» B. False
654.

The DatagramSocket and DatagramPacket classes are not used for connection-less socket programming.

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

The clone() method is defined in?

A. Abstract class
B. Object Class
C. ArrayList class
D. None of the above
Answer» C. ArrayList class
656.

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
657.

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

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

The APPLET tag is used to start an applet from both an HTML document and from an applet viewer.

A. True
B. False
Answer» B. False
659.

The ActionListener interface is not used for handling action events.

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

The ActionListener interface is not used for handling action events

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

The ACID properties does not describes the transaction management well.

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

RMI allows an object to invoke methods on an object running in another JVM

A. True
B. False
Answer» B. False
663.

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

A. True
B. False
Answer» B. False
664.

ResultSet object can be moved forward only and it is updatable.

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

POJO means you are not forced to implement any interface or extend any class.

A. True
B. False
Answer» B. False
666.

PatternSyntaxException Class Methods is an unchecked exception that indicates a syntax error in a regular expression pattern.

A. True
B. False
Answer» B. False
667.

Package does not provide access protection

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

Packages are used for distributing a collection of reusable classes, usually in a format known as Java Archive (JAR) file.

A. True
B. False
Answer» B. False
669.

Nested interface must be public if it is declared outside the interface but it cannot have any access modifier if declared within the class.

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

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
671.

Multiple inheritances is not supported in case of class but it is supported in case of interface.

A. True
B. False
Answer» B. False
672.

Many threads at a time can run in a single process

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

Local inner class can access non-final local variable

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

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
675.

JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you can do with Java servlets.

A. True
B. False
Answer» B. False
676.

JDBC technology-based drivers generally fit into how many categories?

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

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
678.

java.applet defines how many interfaces?

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

Java Virtual Machine is platform independent.

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

Java Plug-in software is not responsible to manage the lifecycle of an Applet.

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

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.
682.

Interceptor can change the flow of the application by returning the string.

A. True
B. False
Answer» B. False
683.

In XML document comments are given as?

A. < !-- --!>
B. < !-- ?
C. < /-- -->
D. < ?-- ?
Answer» C. < /-- -->
684.

In XML which internet languages are markup languages for handheld devices?

A. WAP
B. WML
C. RSS
D. Both A & B
Answer» E.
685.

In which the access modifier means that the field can be accessed by all classes in your application?

A. Private
B. Public
C. Package
D. Protected
Answer» C. Package
686.

In which technology Struts 2 provides various types of tags such as UI tags, Data tags, control tags etc. to ease the development of struts 2 application?

A. Various Result support
B. Integration Support
C. Various Tag support
D. Theme and Template support
Answer» D. Theme and Template support
687.

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
688.

In which configuration file is there a link between the View and Model components in the Web Client but you would not have to touch these settings for 99.99% of your projects?

A. The struts-config.xml file
B. The struts.xml file
C. The web.xml file
D. The struts.properties file
Answer» B. The struts.xml file
689.

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
690.

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
691.

In Servlet Terminology what provides runtime environment for JavaEE (j2ee) applications. It performs many operations that are given below: 1. Life Cycle Management 2. Multithreaded support 3. Object Pooling 4. Security etc.

A. Server
B. Webserver
C. Container
D. Application Server
Answer» D. Application Server
692.

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.
693.

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
694.

In JSP page directive which attribute defines the MIME(Multipurpose Internet Mail Extension) type of the HTTP response?

A. import
B. Content Type
C. Extends
D. Info
Answer» C. Extends
695.

In java, Method Overloading is possible by changing the return type of the method

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

In InetAddress class which method returns the host name of the IP Address?

A. public String getHostName()
B. public String getHostAddress()
C. public static InetAddress getLocalHost()
D. None of the above
Answer» B. public String getHostAddress()
697.

In HTTP Request what asks for the loopback of the request message, for testing or for troubleshooting?

A. PUT
B. OPTIONS
C. DELETE
D. TRACE
Answer» E.
698.

In how many states Threads can be explained ?

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

In Graphics class which method is used to draws a rectangle with the specified width and height?

A. public void drawRect(int x, int y, int width, int height)
B. public abstract void fillRect(int x, int y, int width, int height)
C. public abstract void drawLine(int x1, int y1, int x2, int y2)
D. public abstract void drawOval(int x, int y, int width, int height)
Answer» B. public abstract void fillRect(int x, int y, int width, int height)
700.

In case of Table per Concrete class, there will be three tables in the database having no relations to each other. Which are the ways to map the table?

A. By union-subclass element
B. By self-creating the table for each class
C. Both A & B
D. None of the above
Answer» D. None of the above