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.
| 551. |
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 | |
| 552. |
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. | |
| 553. |
Which Indicates a result set that cannot be updated programmatically in concurrency? |
| A. | CONCUR_UPDATABLE |
| B. | CONCUR_READ_ONLY |
| C. | All of the above |
| D. | None of the above |
| Answer» C. All of the above | |
| 554. |
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 | |
| 555. |
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 | |
| 556. |
Which Exception occurs when a class is not found while dynamically loading a class using the class loaders? |
| A. | ClassNotFoundException |
| B. | ClassFoundException |
| C. | NoClassDefFoundError |
| D. | ClassDefFoundError |
| Answer» B. ClassFoundException | |
| 557. |
Which Error Handling in Java handles runtime errors with exceptions, If an exception is not caught in your JSP or Servlet, Resin will use a special error page to send results back to the browser, Resin uses a default error page unless you explicitly provide an error page yourself? |
| A. | Client Request Time Processing Errors |
| B. | Compilation Time Processing Errors |
| C. | JSP Translation Time Processing Errors |
| D. | None of the above |
| Answer» B. Compilation Time Processing Errors | |
| 558. |
Which enables some interaction with the garbage collector? |
| A. | java.lang.ref |
| B. | java.lang |
| C. | java.lang.reflect |
| D. | java.math |
| Answer» B. java.lang | |
| 559. |
Which defines a method called nextElement that is used to get the next element in a data structure that contains multiple elements? |
| A. | Bitset |
| B. | Vector |
| C. | Stack |
| D. | Enumeration |
| Answer» E. | |
| 560. |
Which default exception handler that performs the following tasks: 1: Prints out exception description. 2: Prints the stack trace (Hierarchy of methods where the exception occurred). 3: Causes the program to terminate. |
| A. | JVM |
| B. | JDK |
| C. | JRE |
| D. | None of the above |
| Answer» B. JDK | |
| 561. |
Which data type has this Minimum and Maximum value from 3.4e-038 to 3.4e+038? |
| A. | long |
| B. | Int |
| C. | Byte |
| D. | Float |
| Answer» E. | |
| 562. |
Which constructor of DatagramSocket class is used to creates a datagram socket and binds it with the given Port Number? |
| A. | DatagramSocket(int port) |
| B. | DatagramSocket(int port, InetAddress address) |
| C. | DatagramSocket() |
| D. | None of the above |
| Answer» C. DatagramSocket() | |
| 563. |
Which containers are used to keep the class name space compartmentalized? |
| A. | Packages |
| B. | Applet |
| C. | Browser |
| D. | None of the above |
| Answer» B. Applet | |
| 564. |
Which configuration files are used in Struts? |
| A. | ApplcationResources.properties |
| B. | struts-config.xml |
| C. | All the above |
| D. | None of the above |
| Answer» D. None of the above | |
| 565. |
Which concept is used to make Java more memory efficient (because no new objects are created if it exists already in string constant pool)? |
| A. | String literal |
| B. | By new keyword |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. By new keyword | |
| 566. |
Which classes has Sun Microsystem suggested not to use for read and write the textual information? |
| A. | BufferedInputStream and BufferedOutputStream |
| B. | SequenceInputStream and SequenceOutputStream |
| C. | FileInputStream and FileOutputStream |
| D. | Both A & B |
| Answer» D. Both A & B | |
| 567. |
Which class provides stream to read binary data such as image etc. from the request object? |
| A. | ServltInputStream |
| B. | ServletOutputStream |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. ServletOutputStream | |
| 568. |
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 | |
| 569. |
Which class is used when a program does not want to handle an exception? |
| A. | Throws |
| B. | Try |
| C. | Catch |
| D. | Final |
| Answer» B. Try | |
| 570. |
Which class is used to uncompress the file in the deflate compression format, It provides facility to the other uncompression filters? |
| A. | DeflaterOutputStream class |
| B. | InflaterInputStream class |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 571. |
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 | |
| 572. |
Which class is used to create servers that listen for either local client or remote client programs? |
| A. | ServerSockets |
| B. | httpServer |
| C. | httpResponse |
| D. | None of the above |
| Answer» B. httpServer | |
| 573. |
Which class is thread-safe i.e. multiple threads cannot access it simultaneously,So it is safe and will result in an order? |
| A. | StringBuffer class |
| B. | StringBuilder class |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. StringBuilder class | |
| 574. |
Which class cannot be instantiated? |
| A. | Abstract Class |
| B. | Static Class |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. Static Class | |
| 575. |
Which class automatically flushes the data so that there is no need to call the flush() method. Moreover, its methods don't throw IOException? |
| A. | Console class |
| B. | Scanner Class |
| C. | FileInputStream class |
| D. | PrintStream class |
| Answer» E. | |
| 576. |
Which class can be used to read data line by line using the readLine() method? |
| A. | BufferedReader |
| B. | InputStreamReader |
| C. | DataInputStream |
| D. | None of the above |
| Answer» B. InputStreamReader | |
| 577. |
Which Characters are illegal in XML elements? |
| A. | " < " |
| B. | "&" |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 578. |
Which character in the XML Element will generate an error because the parser interprets it as the start of a new element? |
| A. | " < " |
| B. | "&" |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. "&" | |
| 579. |
Which block contains a block of program statements where an exception might occur? |
| A. | Catch |
| B. | try |
| C. | throw |
| D. | final |
| Answer» C. throw | |
| 580. |
Which are the XML Syntax rules? |
| A. | All XML Elements Must Have a Closing Tag |
| B. | XML Tags are not Case Sensitive |
| C. | XML Elements Must be Properly Nested |
| D. | Both A & C |
| Answer» E. | |
| 581. |
Which are the techniques for defining the structure of a specific type of XML documents? |
| A. | Schema |
| B. | DTD |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 582. |
Which are the main features of XML? |
| A. | Text data description |
| B. | Human- and computer-friendly format |
| C. | Handles data in a tree structure having one-and only one-root element |
| D. | All mentioned above |
| Answer» E. | |
| 583. |
Which are the common security restrictions in applets? |
| A. | Applets can't load libraries or define native methods |
| B. | An applet can't read every system property |
| C. | Applets can play sounds |
| D. | Both A & B |
| Answer» E. | |
| 584. |
Which are passive controls that do not support any interaction with the user? |
| A. | Choice |
| B. | List |
| C. | Labels |
| D. | Checkbox |
| Answer» D. Checkbox | |
| 585. |
Which are subclasses of FilterInputStream and FilterOutputStream? |
| A. | PipedInputStream |
| B. | PipedOutputStream |
| C. | DataInputStream |
| D. | DataOutputStream |
| E. | Both C & D |
| Answer» F. | |
| 586. |
Which are also known as inner classes? |
| A. | Non-static nested class |
| B. | Static nested class |
| C. | Nested class |
| D. | None of the above |
| Answer» B. Static nested class | |
| 587. |
Which applet java.awt.component class provides the life cycle method? |
| A. | public void paint(Graphics g) |
| B. | public void destroy() |
| C. | public void stop() |
| D. | public void init() |
| Answer» B. public void destroy() | |
| 588. |
Which allows you to migrate your implementations over time without breaking the code that depends on the public interface of your classes? |
| A. | Polymorphism |
| B. | Inheritance |
| C. | Encapsulation |
| D. | Both A & B |
| Answer» D. Both A & B | |
| 589. |
Which allows you to define one interface and have multiple implementations? |
| A. | Encapsulation |
| B. | Inheritance |
| C. | Polymorphism |
| D. | None of the above |
| Answer» D. None of the above | |
| 590. |
Which allows the caller to remove elements from the underlying collection during the iteration with well-defined semantics? |
| A. | Enumeration |
| B. | Iterator |
| C. | None of the above |
| D. | Both A & B |
| Answer» C. None of the above | |
| 591. |
Which allows hyperlinks to point to specific parts (fragments) of XML documents? |
| A. | XPath |
| B. | XSLT |
| C. | XLink |
| D. | Xpointer |
| Answer» E. | |
| 592. |
Which access specifiers can be used for a class so that it’s members can be accessed by a different class in the different package? |
| A. | Private |
| B. | Public |
| C. | Protected |
| D. | None of the above |
| Answer» C. Protected | |
| 593. |
Where does the primitive data type values be stored? |
| A. | Heap Memory |
| B. | Stack Memory |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 594. |
Where can the event handling code be written? |
| A. | Same class |
| B. | Other class |
| C. | Anonymous class |
| D. | All mentioned above |
| Answer» E. | |
| 595. |
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 | |
| 596. |
Where are the following four methods commonly used? 1) public void add(Component c) 2) public void setSize(int width,int height) 3) public void setLayout(LayoutManager m) 4) public void setVisible(boolean) |
| A. | Graphics class |
| B. | Component class |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 597. |
When an applet begins, in which sequence will the AWT call the methods? |
| A. | init(),paint(),start() |
| B. | Start(),paint(),init() |
| C. | intit(),start(),paint() |
| D. | paint(),start(),init() |
| Answer» D. paint(),start(),init() | |
| 598. |
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. | |
| 599. |
What will happen if we call the run() method directly instead of calling the start() method? |
| A. | Each thread starts in a separate call stack. |
| B. | Invoking the run() method from main thread, the run() method goes onto the current call stack rather than at the beginning of a new call stack. |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 600. |
What type of servlets use these methods doGet(), doPost(),doHead, doDelete(), doTrace()? |
| A. | Genereic Servlets |
| B. | HttpServlets |
| C. | All of the above |
| D. | None of the above |
| Answer» C. All of the above | |