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.

351.

By interface, we cannot support the functionality of multiple inheritances.

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

Which method of DataInputStream class reads a line from the file and returns it as a string?

A. WriteInt()
B. readLine()
C. readInt()
D. writeDouble()
Answer» C. readInt()
353.

The Java Virtual Machine is the cornerstone of the Java platform.

A. True
B. False
Answer» B. False
354.

Which class can handle any type of request so that it is protocol-independent?

A. GenericServlet
B. HttpServlet
C. Both A & B
D. None of the above
Answer» B. HttpServlet
355.

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

What is used to execute parameterized query?

A. Statement interface
B. PreparedStatement interface
C. ResultSet interface
D. None of the above
Answer» C. ResultSet interface
357.

Which interface must be implemented by the Action class to store the information in the session scope?

A. SessionAware Interface
B. ServletContextAware Interface
C. Both A & B
D. None of the above
Answer» B. ServletContextAware Interface
358.

AWT has more powerful components like tables, lists, scroll panes, color chooser, tabbed pane etc.

A. True
B. False
Answer» B. False
359.

Filtered streams are simply wrappers around underlying input or output streams that transparently provide some extended level of functionality.

A. True
B. False
Answer» B. False
360.

Find the correct syntax of the declaration which defines the XML Version?

A. < ?xml version= "1.0" ? >
B. < xml version="1.0"/ >
C. < ?xml version="1.0" / >
D. None of the above
Answer» B. < xml version="1.0"/ >
361.

Which class members can be accessed from the classes in the same package as well as classes in other Packages that are subclasses of the declaring class?

A. private
B. Public
C. Protected
D. None of the above
Answer» D. None of the above
362.

Which method of object class can clone an object?

A. copy()
B. Objectcopy()
C. Objectclone()
D. Clone()
Answer» D. Clone()
363.

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

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

Which is a technique in Java in which a class can have any number of constructors that differ in parameter lists?

A. Constructor overloading
B. Method overloading
C. Operator overloading
D. None of the above
Answer» B. Method overloading
365.

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

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

Which packages represent interfaces and classes for servlet API?

A. javax.servlet
B. javax.servlet.http
C. Both A & B
D. None of the above
Answer» D. None of the above
367.

Which JDBC type represents a 64-bit signed integer value between -9223372036854775808 and 9223372036854775807?

A. SMALLINT
B. BIGINT
C. TINYINT
D. INTEGER
Answer» C. TINYINT
368.

When an applet is terminated which of the following sequence of methods calls take place?

A. stop(),paint(),destroy()
B. destroy(),stop(),paint()
C. destroy(),stop()
D. stop(),destroy()
Answer» E.
369.

Which method is called only once during the run time of your applet?

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

Which is a component in AWT that can contain another components like buttons, textfields, labels etc.?

A. Window
B. Container
C. Panel
D. Frame
Answer» C. Panel
371.

Java Virtual Machine is platform independent.

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

Which are subclasses of FilterInputStream and FilterOutputStream?

A. PipedInputStream
B. PipedOutputStream
C. DataInputStream
D. DataOutputStream
E. Both C & D
Answer» F.
373.

The Object class is not a parent class of all the classes in java by default.

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

Which method is used to send the same request and response objects to another servlet in RequestDispacher ?

A. forward()
B. sendRedirect()
C. Both A & B
D. None of the above
Answer» B. sendRedirect()
375.

Which EJB container must provide an implementation of Java Naming and Directory Interface (JNDI) API to provide naming services for EJB clients and components?

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

Web server is used for loading the init() method of servlet.

A. True
B. False
Answer» B. False
377.

Servlets handle multiple simultaneous requests by using threads.

A. True
B. False
Answer» B. False
378.

RMI is a server-side component; It is not required to be deployed on the server.

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

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

How many jsp implicit objects are there and these objects are created by the web container that are available to all the jsp pages?

A. 8
B. 9
C. 10
D. 7
Answer» C. 10
381.

The ResultSet.next method is used to move to the next row of the ResultSet, making it the current row.

A. True
B. False
Answer» B. False
382.

Which provides accessibility to classes and interface?

A. import
B. Static import
C. All the above
D. None of the above
Answer» B. Static import
383.

Which is used to call the stored procedures and functions?

A. CallableStatement Interface
B. PreparedStatement Interface
C. All the above
D. None of the above
Answer» B. PreparedStatement Interface
384.

Which interfaces provide methods for batch processing in JDBC?

A. java.sql.Statement
B. java.sql.PreparedStatement
C. All the above
D. None of the above
Answer» D. None of the above
385.

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

A session bean represents a multiple clients inside the Application Server.

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

What are the exceptions which have to be handled in a RMI client program?

A. RemoteException
B. NotBoundException
C. MalFormedURLException
D. All mentioned above
Answer» E.
388.

Which kind of driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, IBM DB2, or other DBMS?

A. JDBC-ODBC bridge plus ODBC driver
B. Native-API partly-Java driver
C. JDBC-Net pure Java driver
D. Native-protocol pure Java driver
Answer» C. JDBC-Net pure Java driver
389.

RMI uses a layered architecture; each of the layers could be enhanced or replaced without affecting the rest of the system.

A. True
B. False
Answer» B. False
390.

Which statement provides an easy way to dispatch execution to different parts of your code based on the value of an expression?

A. If
B. Switch
C. Nested-if
D. if-else-if
Answer» C. Nested-if
391.

Which field of StreamTokenizer if the token is a word, this filed contains the word that can be used in programming?

A. String sval
B. double nval
C. int ttype
D. static final int TT_WORD
Answer» C. int ttype
392.

Classes in the same package cannot access each other's package-access members.

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

Which is used to separate the hierarchy of the class while declaring an import statement?

A. Package
B. Applet
C. Browser
D. All of the above
Answer» B. Applet
394.

Which method of string class in java is used to convert the boolean into String?

A. public static String valueOf(double I)
B. public static String valueOf(boolean I)
C. public boolean equals(Object anObject)
D. public static String valueOf(Object obj)
Answer» B. public static String valueOf(boolean I)
395.

We need to write the controller code self, If we change the controller code, we need to recompile the class and redeploy the application this is a disadvantage of which MVC Architecture?

A. MVC 1 Architecture
B. MVC 2 Architecture
C. All of the above
D. None of the above
Answer» C. All of the above
396.

In RMI, the objects are passed by _____.

A. Value
B. Reference
C. Value and Reference
D. None of the above
Answer» B. Reference
397.

Struts combines which of these in to a unified Framework?

A. Java Servlets
B. Java Server pages
C. Custom tags and Message Resources
D. All mentioned above
Answer» E.
398.

The performance of the application will be faster if you use PreparedStatement interface because query is compiled only once.

A. True
B. False
Answer» B. False
399.

EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE.

A. True
B. False
Answer» B. False
400.

Which class is used for this Processing Method processActionEvent( )?

A. Button,List,MenuItem
B. Button,Checkbox,Choice
C. Scrollbar,Component,Button
D. None of the above
Answer» B. Button,Checkbox,Choice