Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

  The PipedInputStream and PipedOutputStream classes can be used to read and write data simultaneously.

A. True
B. False
Answer» B. False
2.

   Implement the Listener interface and overrides its methods is required to perform in event handling.

A. True
B. False
Answer» B. False
3.

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

The following example shows the creation of a  import java.applet.*; import java.awt.*; public class Main extends Applet{ public void paint(Graphics g){ g.drawString("Welcome in Java Applet.",40,20); } }

A. Banner using Applet
B. Basic Applet
C. Display clock
D. None of the above
Answer» C. Display clock
5.

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

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

  Abbreviate the term UDA?

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

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

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. Both A & B
D. None of the above
Answer» B. Container-managed transactions
10.

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

A. True
B. False
Answer» B. False
11.

Break statement in switch case  

A. prevents from fallthrough
B. causes an exit from innermost loop
C. both a and b
D. none
Answer» D. none
12.

Fallthrough in a switch case statement

A. prevents the next case after the matching block to be executed
B. Allows the next case after the matching block to be executed
C. no fallthorugh occurs in switch case
D. none
Answer» C. no fallthorugh occurs in switch case
13.

 Overloaded methods in java

A. Compiler uses method signature to determine which method to invoke. They may have different functionality
B. They are not available in fundamental classes
C. They have the same name and signature
Answer» B. They are not available in fundamental classes
14.

 Which Java.Lang contains only static methods?

A. Math ,System
B. Number,Exception
C. There is no such class
D. none
Answer» B. Number,Exception
15.

 Invoking methods characteristics

A. methods can be invoked in any order and calling method should be in same class as worker method
B. Worker method and calling method can be invoked in same way
C. Any method can call any method
Answer» B. Worker method and calling method can be invoked in same way
16.

Constructor chaining is

A. subclass constructor calling super class constructor
B. super class constructor calling subclass constructor
C. both
D. none
Answer» B. super class constructor calling subclass constructor
17.

 Abstract class vs Interface

A. A class may inherit only one abstract class but may inherit several interfaces.
B. An abstract class can provide complete and default code but an interface has no code
C. both a and b
D. none
Answer» D. none
18.

 Use of preprocessor directive in OOP

A. for conditional compilation
B. for macro expansion
C. error and warning reporting
D. all the above
Answer» E.
19.

 Pure virtual function is used

A. to give meaning to derived class function
B. to give meaning to base class function
C. to initialize all functions
D. None
Answer» C. to initialize all functions
20.

Function templates are considered equivalent when

A. Declared in same scope
B. Having same name
C. Having identical return type and parameter list
D. All of the above
Answer» E.
21.

 Function Templates can have

A. Explicit instantiation definition with template argument for all parameters
B. explicit instantiation of declaration with template argument for all parameters
C. Both a and b
D. None
Answer» D. None
22.

 An Abstract class

A. allows normal method declaration within
B. can be instantiated
C. Must have abstract methods with implemetation within
D. none
Answer» B. can be instantiated
23.

The keyword 'this' is used

A. As reference to current object
B. Explicit constructor invocation
C. In open recursion
D. All the above
Answer» E.
24.

Encapsulation helps

A. information hiding
B. in providing low coupling
C. in providing high cohesion
D. All the above
Answer» E.
25.

Dynamic dispatch is a feature that

A. selects which polymorphic operation to call at run time
B. selects which polymorphic operation to call at compile time
C. Both a and b
D. None
Answer» C. Both a and b
26.

  Virtual keyword is used

A. to remove static linkages
B. to call function based on kind of object it is being called for
C. to call the methods that dont exist at compile time
D. all the above
Answer» E.
27.

Why is user defined copy constructor required?

A. there is no implicit copy constructor in C++
B. when pointers are involved implicit copy constructor does not give correct result
C. both a and b
D. none
Answer» C. both a and b
28.

 A copy constructor is called

A. when an object is returned by value
B. when an object is passed by value as an argument
C. when compiler generates a temporary object
D. all the above
Answer» E.
29.

  Which of the following is true about linked lists?

A. Primary education
B. Intermediate education
C. Higher education
D. Entire education system
Answer» D. Entire education system
30.

What would be the output of following code? #include<stdio.h> int main(int argc,char **argv) { int iVar=0, iCnt, aiArr[] = {56,23,4,89,-200,34}; for(iCnt = 1; iCnt <6; iCnt++) { if(aiArr[iCnt] < aiArr[iVar]) iVar = iCnt; } printf("%d",iVar); return 0; }

A. 4
B. 89
C. 3
D. -200
Answer» B. 89
31.

When is a static variable initialized?

A. Every time the function containing it is called.
B. When it is globally declared.
C. Only when declared within a function.
D. Only the first time the function containing it is called
Answer» E.
32.

Memory is allocated from_______________for each and every malloc function call

A. Stack
B. Heap
C. Static memory area
D. Cache
Answer» C. Static memory area
Previous Next