MCQOPTIONS
Saved Bookmarks
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.
| 451. |
Which pattern is the struts framework based? |
| A. | MVC2 Pattern |
| B. | Bridge Pattern |
| C. | MVC 1 Pattern |
| D. | None of the above |
| Answer» B. Bridge Pattern | |
| 452. |
Which program obtains a remote reference to one or more remote objects on a server and then invokes methods on them in an RMI application? |
| A. | Server |
| B. | Client |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 453. |
Which provides a new way for your programs to interface with code libraries written in other languages? |
| A. | JNI |
| B. | JDBC |
| C. | RMI |
| D. | GUI |
| Answer» B. JDBC | |
| 454. |
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 | |
| 455. |
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 | |
| 456. |
Which servlet does the struts framework use? |
| A. | EntryServlet |
| B. | StrutsServlet |
| C. | ActionServlet |
| D. | BasicServlet |
| Answer» D. BasicServlet | |
| 457. |
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 | |
| 458. |
Which state is the thread still alive, but is currently not eligible to run? |
| A. | Non-Runnable |
| B. | Terminated |
| C. | Runnable |
| D. | Running |
| Answer» B. Terminated | |
| 459. |
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 | |
| 460. |
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. | |
| 461. |
Which stream does Java application uses to read data from a source, it may be a file, an array, peripheral device or socket? |
| A. | InputStream |
| B. | OutputStream |
| C. | Input/OutputStream |
| D. | None of the above |
| Answer» B. OutputStream | |
| 462. |
Which string function returns the number of characters in a string? |
| A. | length() |
| B. | replace() |
| C. | charAt() |
| D. | equalIgnoreCase() |
| Answer» B. replace() | |
| 463. |
Which symbol is used to contain the values of automatically initialized arrays. Also used to define a block of code, for classes, methods, and local scopes? |
| A. | Brackets |
| B. | Braces |
| C. | Parentheses |
| D. | Semicolon |
| Answer» C. Parentheses | |
| 464. |
Which Thread pool is used where container creates a thread pool to process the request? |
| A. | Servlet |
| B. | JSp |
| C. | All of the above |
| D. | None of the above |
| Answer» D. None of the above | |
| 465. |
Which type of inheritance one super-class have more than one sub-class? |
| A. | Hierarchical inheritance |
| B. | Single inheritance |
| C. | Multiple inheritances |
| D. | Multilevel inheritance |
| Answer» B. Single inheritance | |
| 466. |
Which type of java package that contains wide range of classes and methods are used for performing different functionalities? |
| A. | User Defined Package |
| B. | Java System Packages |
| C. | User System Packages |
| D. | None of the above |
| Answer» C. User System Packages | |
| 467. |
Which type of polymorphism is nothing but the method overloading in java? |
| A. | Compile time polymorphism |
| B. | Runtime polymorphism |
| C. | Static polymorphism |
| D. | Both A & C |
| Answer» E. | |
| 468. |
Which type of validation we must implement the Validateable interface (or extend ActionSupport class) and provide the implementation of validate method? |
| A. | By Input Validation |
| B. | By Ajax Validation |
| C. | By Custom Validation |
| D. | None of the above |
| Answer» D. None of the above | |
| 469. |
Which validates the given string with the specified regular expression,it can be used in password, security key etc.? |
| A. | Regex Validation |
| B. | Url Validation |
| C. | Email Validation |
| D. | RequiredString Validator |
| Answer» B. Url Validation | |
| 470. |
Which way will the architecture and flow of struts 2 application will go to understand the struts flow? |
| A. | Basic |
| B. | Standard |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 471. |
Which ways are used by the Log4j and Logback frameworks in hibernate framework to support logging? |
| A. | By log4j.xml file |
| B. | By log4j.properties |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 472. |
Who is also called father of Java Programming Language? |
| A. | James Gosling |
| B. | Ken Thompson |
| C. | Dennis Richie |
| D. | None of the above |
| Answer» B. Ken Thompson | |
| 473. |
Wrapper classes are not used to convert any data type into an object. |
| A. | True |
| B. | False |
| Answer» C. | |
| 474. |
XML attribute values must always be enclosed in quotes |
| A. | True |
| B. | False |
| Answer» B. False | |
| 475. |
XML documents must contain a root element; this element is "the parent" of all other elements |
| A. | True |
| B. | False |
| Answer» B. False | |
| 476. |
XML is designed to carry data, and to display data |
| A. | True |
| B. | False |
| Answer» C. | |
| 477. |
XML is the most common tool for data transmissions between all sorts of applications |
| A. | True |
| B. | False |
| Answer» B. False | |
| 478. |
XML is designed to store data and _____. |
| A. | Design |
| B. | Verify |
| C. | Transport |
| D. | Both A & B |
| Answer» D. Both A & B | |
| 479. |
XML is a programming language like C# or Java. |
| A. | True |
| B. | False |
| Answer» C. | |
| 480. |
XML is ? |
| A. | Platform Independent |
| B. | Language Independent |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 481. |
Which of the following is an advantage of the statement – Separation of business logic from JSP ? |
| A. | Custom Tags in JSP |
| B. | JSP Standard Tag Library |
| C. | All the above |
| D. | None of the above |
| Answer» B. JSP Standard Tag Library | |
| 482. |
Which object of HttpSession can be used to view and manipulate information about a session? |
| A. | session identifier |
| B. | creation time |
| C. | last accessed time |
| D. | All mentioned above |
| Answer» E. | |
| 483. |
Which object can be constructed to show any number of choices in the visible window? |
| A. | Labels |
| B. | Choice |
| C. | List |
| D. | Checkbox |
| Answer» D. Checkbox | |
| 484. |
Which model does a Java applet or application talks directly to the data source? |
| A. | Two-tier models |
| B. | Three-tier models |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. Three-tier models | |
| 485. |
Which methods returns a stream that simply provides the raw bytes from the database without any conversion? |
| A. | getCharacterStream |
| B. | getBinaryStream |
| C. | getAsciiStream |
| D. | getUnicodeStream |
| Answer» C. getAsciiStream | |
| 486. |
Which methods are provided by the PrintStream class? |
| A. | Read data to another stream |
| B. | Write data to another stream |
| C. | Read data to same stream |
| D. | Write data to same stream |
| Answer» C. Read data to same stream | |
| 487. |
Which methods are commonly used in ServerSocket class? |
| A. | public OutputStream getOutputStream() |
| B. | public Socket accept() |
| C. | public synchronized void close() |
| D. | None of the above |
| Answer» C. public synchronized void close() | |
| 488. |
Which method when implemented must return true while there are still more elements to extract, and false when all the elements have been enumerated? |
| A. | Object nextElement( ) |
| B. | boolean hasMoreElements( ) |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 489. |
Which method waits for a thread to die? |
| A. | stop() |
| B. | start() |
| C. | terminate() |
| D. | join() |
| Answer» E. | |
| 490. |
Which method returns an enumeration of the values contained in the dictionary? |
| A. | Enumeration elements() |
| B. | Enumeration keys() |
| C. | Enumeration propertyNames() |
| D. | None of the above |
| Answer» B. Enumeration keys() | |
| 491. |
Which method returns a reference to the currently executing thread object? |
| A. | currentThread() |
| B. | runningThread() |
| C. | runnableThread() |
| D. | None of the above |
| Answer» B. runningThread() | |
| 492. |
Which method returns the interrupted flag after that it sets the flag to false if it is true? |
| A. | isInterrupted() |
| B. | static interrupted() |
| C. | non static interrupted() |
| D. | Both A & C |
| Answer» C. non static interrupted() | |
| 493. |
Which method of URL class represents a URL and it has complete set of methods to manipulate URL in Java? |
| A. | java.net.URL |
| B. | java.net.URLConnection |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. java.net.URLConnection | |
| 494. |
Which method of the Naming class (found in java.rmi) is used to update the RMI registry on the server machine? |
| A. | rebind () |
| B. | lookup() |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. lookup() | |
| 495. |
Which method of object class can clone an object? |
| A. | copy() |
| B. | Objectcopy() |
| C. | Objectclone() |
| D. | Clone() |
| Answer» D. Clone() | |
| 496. |
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() | |
| 497. |
Which method of 'Class' class is used to register the driver class and the method is used to dynamically load the driver class? |
| A. | forName() |
| B. | getConnection() |
| C. | createStatement() |
| D. | executeQuery() |
| Answer» B. getConnection() | |
| 498. |
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() | |
| 499. |
Which method is used to suspend threads that don’t need to run when the applet is not visible? |
| A. | destroy() |
| B. | paint() |
| C. | stop() |
| D. | start() |
| Answer» D. start() | |
| 500. |
Which method is used to set the graphics current color to the specified color in the graphics class? |
| A. | public abstract void setFont(Font font) |
| B. | public abstract void setColor(Color c) |
| C. | public abstract void drawString(String str, int x, int y) |
| D. | None of the above |
| Answer» C. public abstract void drawString(String str, int x, int y) | |