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.

1.

Which was the first most widely used programming interface for accessing relational databases and it offers the ability to connect all the databases on all the platforms.?

A. JDBC API
B. ODBC API
C. Both A & B
D. None of the above
Answer» C. Both A & B
2.

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

JavaServer Pages often serve the same purpose as programs implemented using the Common Gateway Interface (CGI)

A. True
B. False
Answer» B. False
4.

The life cycle of session bean is not maintained by the application server (EJB Container).

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

Which package is used for Remote Method Invocation (RMI)?

A. java.lang.rmi
B. java.lang.reflect
C. java.applet
D. java.rmi
Answer» E.
6.

What is the range of the int data type?

A. –2,147,483,648 to 2,147,483,647
B. -2,147,483,647 to 2,147,483,648
C. -32,768 to 32,767
D. -32,767 to 32,768
Answer» B. -2,147,483,647 to 2,147,483,648
7.

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

A. True
B. False
Answer» B. False
8.

Garbage Collection is the process of reclaiming the runtime unused memory automatically.

A. True
B. False
Answer» B. False
9.

How many techniques are used in Session Tracking?

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

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

What technique is used for the authentication mechanism in the servlet specification?

A. Role Based Authentication
B. Form Based Authentication
C. Both A & B
D. None of the above
Answer» B. Form Based Authentication
12.

Which of these simplifies an Object Relational Mapping tool?

A. Data creation
B. Data manipulation
C. Data access
D. All mentioned above
Answer» E.
13.

Servlet technology is used to create web application

A. True
B. False
Answer» B. False
14.

The object cloning is a way to create exact copy of an object

A. True
B. False
Answer» B. False
15.

How many JDBC product components does the Java software provides?

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

Which result set generally does not show changes to the underlying database that are made while it is open. The membership, order, and column values of rows are typically fixed when the result set is created?

A. TYPE_FORWARD_ONLY
B. TYPE_SCROLL_INSENSITIVE
C. TYPE_SCROLL_SENSITIVE
D. ALL MENTIONED ABOVE
Answer» C. TYPE_SCROLL_SENSITIVE
17.

JDBC is a Java API that is used to connect and execute query to the database

A. True
B. False
Answer» B. False
18.

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

A. True
B. False
Answer» B. False
19.

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

Which packages does a JSP API consist of?

A. javax.servlet.jsp
B. java.servlet
C. javax.servlet.jsp.tagext
D. Both A & C
Answer» E.
21.

How many layers are available in Hibernate architecture?

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

EJB technology is built on the top of Socket Programming

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

Applet runs inside the browser and works at client side

A. True
B. False
Answer» B. False
24.

AWT is used for GUI programming in java

A. True
B. False
Answer» B. False
25.

TCP,FTP,Telnet,SMTP,POP etc. are examples of ?

A. Socket
B. IP Address
C. Protocol
D. MAC Address
Answer» D. MAC Address
26.

Which is commonly used method of ByteArrayOutputStream class?

A. ByteArrayOutputStream()
B. ByteArrayOutputStream(int size)
C. public synchronized void writeTo(OutputStream out) throws IOException
D. Both A & B
Answer» D. Both A & B
27.

Thread class constructor allocates a new thread object

A. True
B. False
Answer» B. False
28.

Which of the package is used to enable interaction with garbage collector?

A. java.lang.ref
B. java.lang.reflect
C. java.lang
D. java.awt
Answer» B. java.lang.reflect
29.

Which inheritance is not supported in java?

A. Single inheritance
B. Multiple
C. Multilevel inheritance
D. Hybrid
E. Java supports all of the above
Answer» F.
30.

The clone() method is defined in?

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

Where are these five keywords try, catch, finally, throw, and throws used in?

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

The life cycle of the thread is controlled by ?

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

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

The ActionListener interface is not used for handling action events

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

java.applet defines how many interfaces?

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

The wrapper classes are part of the which package, that is imported by default into all Java programs?

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

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()
38.

Which steps occur when establishing a TCP connection between two computers using sockets?

A. The server instantiates a ServerSocket object, denoting which port number communication is to occur on
B. The server invokes the accept() method of the ServerSocket class. This method waits until a client connects to the server on the given port
C. After the server is waiting, a client instantiates a Socket object, specifying the server name and port number to connect to
D. All of the above
Answer» E.
39.

In XML document comments are given as?

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

XML attribute values must always be enclosed in quotes

A. True
B. False
Answer» B. False
41.

XML is designed to carry data, and to display data

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

Which field cannot be changed after the object has been constructed?

A. Static field
B. Non-static field
C. Final field
D. Naming field
Answer» D. Naming field
43.

If the superclass method does not declare an exception, subclass overridden method cannot declare the checked exception but it can declare unchecked exception.

A. True
B. False
Answer» B. False
44.

Which is used as an internal buffer and adds more efficiency than to write data directly into a stream. So, as to makes the performance fast?

A. BufferedOutputStream
B. ByteArrayOutputStream
C. BufferedInputStream
D. ByteArrayInputStream
Answer» B. ByteArrayOutputStream
45.

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

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

Which session bean does the conversational state between multiple method calls is not maintained by the container?

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

How many types of JDBC drivers are available?

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

In the following statements identify the disadvantages of CGI?

A. If number of clients increases, it takes more time for sending response
B. For each request, it starts a process and Web server is limited to start processes
C. It uses platform dependent language e.g. C, C++, perl
D. All mentioned above
Answer» E.
49.

Hibernate framework simplifies the development of java application to interact with the database

A. True
B. False
Answer» B. False
50.

What is responsible in MVC for managing the data of the application which responds to the request from the view as well as to the instructions from the controller to update itself?

A. View
B. Model
C. Controller
D. None of the above
Answer» C. Controller