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.

501.

Which method is used to invoke the garbage collector to perform the cleanup processing?

A. gc() method
B. finalize() method
C. q.get() method
D. None of the above
Answer» B. finalize() method
502.

Which method is used in thread class to test if the current thread has been interrupted?

A. public static boolean interrupted()
B. public boolean isInterrupted()
C. public void interrupt()
D. public boolean isAlive()
Answer» B. public boolean isInterrupted()
503.

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

Which method is used for retrieving streams of both ASCII and Unicode characters is new in the JDBC 2.0 core API?

A. getCharacterStream
B. getBinaryStream
C. getAsciiStream
D. getUnicodeStream
Answer» B. getBinaryStream
505.

Which method is first Called for any applet when it starts its execution?

A. void init()
B. void destroy()
C. boolean isActive()
D. None of the above
Answer» B. void destroy()
506.

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

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

Which method is easy for a java programmer to add a criteria?

A. HCQL
B. HQL
C. SQL
D. None of the above
Answer» B. HQL
508.

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

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

Which method compares the given object to 'this' object?

A. public boolean equals(Object obj)
B. public final void notifyAll()
C. public final void notify()
D. public final ClassgetClass()
Answer» B. public final void notifyAll()
511.

Which method causes the current thread to wait for the specified milliseconds, until the another thread notifies? (invokes notify() or notifyAll() method)?

A. public final void wait(long timeout)throws InterruptedException
B. protected void finalize()throws Throwable
C. public final void wait(long timeout,int nanos)throws InterruptedException
D. protected Object clone() throws CloneNotSupportedException
Answer» B. protected void finalize()throws Throwable
512.

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

Which method cannot be overridden?

A. Final Method
B. Final class
C. Final Variable
D. Both A & C
Answer» B. Final class
514.

Which mechanism is used when a thread is paused running in its critical section and another thread is allowed to enter (or lock) in the same critical section to be executed?

A. Inter-thread communication
B. Initial-thread communication
C. Mutual Exclusive
D. None of the above
Answer» B. Initial-thread communication
515.

Which mechanism is provided to handle the runtime errors so that normal flow of the application can be maintained?

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

Which language is Extensible Markup Language (XML) similar?

A. HTML
B. PHP
C. JavaScript
D. Wordpress
Answer» B. PHP
517.

Which language is case sensitive?

A. HTML
B. XML
C. Both A & B
D. None of the above
Answer» C. Both A & B
518.

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

Which keyword is used to make the classes and interface of another package accessible to the current package?

A. Import
B. Implements
C. Instanceof
D. None of the above
Answer» B. Implements
520.

Which keyword is used by classes to implement an interface?

A. import
B. implements
C. instance of
D. None of the above
Answer» C. instance of
521.

Which keyword is used for the block to handle the exceptions generated by try block?

A. Catch
B. Final
C. throw
D. try
Answer» B. Final
522.

Which JDBC type represents a "single precision" floating point number that supports seven digits of mantissa?

A. REAL
B. DOUBLE
C. FLOAT
D. INTEGER
Answer» B. DOUBLE
523.

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

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

Which is used to store data and partial results, as well as to perform dynamic linking, return values for methods, and dispatch exceptions?

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

Which is used to make asynchronous request i.e. it doesn't block the user and it sends only required field data to the server side not all, So it makes the performance fast?

A. AJAX Support
B. Integration Support
C. Various Tag Support
D. Theme and Template Support
Answer» B. Integration Support
527.

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

Which is used for writing data to a file in file handling?

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

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

Which is used about text data that should not be parsed by the XML parser?

A. CDATA
B. PCDATA
C. None of the above
D. Both A & B
Answer» B. PCDATA
531.

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

Which is the container that doesn't contain title bar and MenuBars but it can have other components like button, textfield etc?

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

Which is nothing but a blueprint or a template for creating different objects which defines its properties and behaviours?

A. An Array
B. A class
C. Interface
D. None of the above
Answer» C. Interface
534.

Which is not a XML function?

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

Which is not a W3C-recommended specification?

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

Which is irrecoverable?

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

Which is invoked after the init() method or browser is maximized?

A. public void start()
B. public void paint(Graphics g)
C. Public void stop()
D. Public void init()
Answer» B. public void paint(Graphics g)
538.

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

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

Which is a superclass of all exception classes?

A. Throwable
B. Exception
C. RuntimeException
D. IOException
Answer» B. Exception
541.

Which is a special type of program that is embedded in the webpage to generate the dynamic content?

A. Package
B. Applet
C. Browser
D. None of the above
Answer» C. Browser
542.

Which is a software- and hardware-independent tool for carrying information?

A. HTML
B. XML
C. Both A & B
D. None of the above
Answer» C. Both A & B
543.

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

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

Which is a non-static method having the same name as its class?

A. Field
B. Method
C. Constructor
D. None of the above
Answer» D. None of the above
546.

Which is a mechanism where one object acquires all the properties and behaviors of the parent object?

A. Inheritance
B. Encapsulation
C. Polymorphism
D. None of the above
Answer» B. Encapsulation
547.

Which is a language for finding information in an XML document?

A. Xpath
B. XSLT
C. XLink
D. XPointer
Answer» B. XSLT
548.

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

Which internet language is used for describing available web services in XML?

A. WSDL
B. RSS
C. RDF
D. OWL
Answer» B. RSS
550.

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