CS506 MCQ's Final Term Paper


  • Cyberian's Gold

    1. JSP ____________ action element is used to obtain a reference to an existing JavaBean object.

    Select correct option:
    useBean
    setProperty
    getProperty
    None of these
    Question:2
    When JSP page compiled, it is translated into?
    Select correct option:
    Applet
    Application
    Servlet
    Web Browser
    Question:3
    Hidden Forms Fields contain the information that is needed to send to the
    Select correct option:
    Client
    Server
    Both server and client
    Neither server nor client
    Question:4
    Which of the following is used to work with javaBean to include pages at request time and
    forward request to other sources?
    Select correct option:
    JSP action element
    JSP declaration
    Scriptlets
    JSP expression
    Question:5
    To define the error page in JSP we use following tag?
    Select correct option:
    exception-type
    error-type
    error-page
    exception-page

    Question:6
    setAttribute(String, Object) associates a ----------with a name.
    Select correct option:
    Value
    Object
    String
    Both String and Object
    Question:7
    “application” is a object of
    Select correct option:
    ServletContext
    HttpSession
    ServletConfig
    Both ServletConfig and HttpSession
    Question:8
    JSP comments are declared through following tag
    Select correct option:
    <%@ %>
    <%-- --%>
    <%! %>
    <%= %>
    Question:9
    Which of the following is NOT true about JavaBean?
    Select correct option:
    It should not have any public variable.
    It must be serializable.
    It must not have any zero argument constructor.
    Private instances must be accessed via setters/getters.
    Question:10
    JSP page is a ---------------document that describes how to process a request to create a response.
    Select correct option:
    Text-based
    xml-based
    Both text-based and xml-based
    Neither xml-based nor Text-based

    Question:11
    From the following which is not a basic function of web-based application:
    Select correct option:
    Presentation
    Debugging
    Business Logic
    Data Management
    Question:12
    Client is referred as a
    Select correct option:
    Computer user
    Computer that a person is using for communication purpose
    Person which carry out web surfing
    None of these
    Question:13
    To destroy the session in Servlet we use?
    Select correct option:
    session.destroy()
    session.invalidate()
    session.end()
    session.Kill()
    Question:14
    “application” is a object of
    Select correct option:
    ServletContext
    HttpSession
    ServletConfig
    Both ServletConfig and HttpSession
    Question:15
    Which of the following is NOT a JSP action element?
    Select correct option:
    useBean
    setProperty
    getProperty
    javaBean

    Question:16
    From the following indicators; which is added in user session to know the session time out?
    Select correct option:
    Sessiontimeoutindicator
    SessionTimeOutIndicator
    SessionTimeoutIndicator
    sessionTimeOutIndicator
    Question:17
    From following which one is the object of JspWriter used to send output to the client.
    Select correct option:
    request
    out
    response
    Both request and response
    Question:18
    Which of the following is NOT true about JavaBean?
    Select correct option:
    It should not have any public variable.
    It must be serializable.
    It must not have any zero argument constructor.
    Private instances must be accessed via setters/getters.
    Question:19
    Relationship between JSP and servlets is
    Select correct option:
    Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime
    usage
    JSP and servlets are unrelated technologies
    Servlets and JSP are competing technologies for handling web requests. Servlets are
    being superseded by JSP, which is preferred. The two technologies are not useful in
    combination
    JSPs are built on servlet semantics and all JSPs are compiled to servlets for runtime usage
    Question:20
    getId( ) returns the unique ID of
    Select correct option:
    Current session
    Previous session
    Next session
    Both Next and Previous session

    Question:21
    Which of the following is used to work with javaBean to include pages at request time and
    forward request to other sources?
    Select correct option:
    JSP action element
    JSP declaration
    Scriptlets
    JSP expression
    Question:22
    Packages are the way to organize files into different -------------according to their functionality,
    usability as well as category they should belong to.
    Select correct option:
    Directories
    Folders
    Libraries
    Both Folders and Libraries
    Question:23
    getAttribute(String) extracts----------- stored value from a session object
    Select correct option:
    Subsequently
    Currently
    Previously
    Both Currently and Subsequently
    Question:24
    What is the initial contact point for handling a web request in a Page-Centric architecture?
    Select correct option:
    JSP page
    JavaBean
    servlet
    HTML page
    Question:25
    From the following methods, which method cannot be overridden in the JSP page
    Select correct option:
    _jspService()
    jspDestroy()
    jspInit()
    Both jspDestroy()and jspInit()

    Question:26
    JSP ____________ action element is used to obtain a reference to an existing JavaBean object.
    Select correct option:
    useBean
    setProperty
    getProperty
    None of these
    Question:27
    In JSP Instance variables and method are declared through following tag
    Select correct option:
    <%@ %>
    <%-- --%>
    <%! %>
    <%= %> (not sure)
    Question:28
    All -----------data is kept at the application server.
    Select correct option:
    Dynamic
    Static
    Both dynamic and static
    Neither Static nor Dynamic
    Question:29
    A java program that has some design conventions is called_________?
    Select correct option:
    Java servlet
    JSP
    JSF
    JavaBean
    Question:30
    A cookie is a piece of ------- that a web server can store on a client’s hard disk.
    Select correct option:
    Text
    Number
    String
    Both Number and String

    Question:32
    Which of the following Environment variable tells the system about the root directory of TOMCAT?
    Select correct option:
    JAva_HOME
    CATALINA_HOME
    CLASSPATH
    PATH
    Question:33
    Which of the following statement is correct to assign maximum priority to thread “t2”?
    Select correct option:
    t2.setPriority(Thread.PRIORITY_MiX);
    t2.setPriority(Thread.PRIORITY_MAX)
    t2.setPriority(Thread.MAX_PRIORITY);
    t2.setPriority(Thread.MIX_PRIORITY);
    Question:34
    Which of the following object contains information specific to a servlet?
    Select correct option:
    ServletContext
    ServletConfig
    ServletRequest
    ServletResponse
    Question:35
    Which of the following range of response code signify error by server?
    Select correct option:
    200-299
    300-399
    400-499
    500-599
    Question:36
    From the following which ID is transmitted between the client and the server
    Select correct option:
    Session ID
    Network ID
    Server ID
    None of these
    Question:37
    Which of the following is NOT a web technoloy of Java?
    Select correct option:
    Servlet
    JSP
    ASP
    JSF
    Question:38
    Moving session from one server to another in case of server failure is known as
    Select correct option:
    Session Migration
    Session Tracking
    Session Hijacking
    Both Session Hijacking and Tracking
    Question:39
    Which one is used to collect data when a user navigates between web pages?
    Select correct option:
    Session Tracking
    User Tracking
    Session Migration
    Both User Tracking and Session Migration
    Question:40
    Which of the following method allows any other thread of same priority to execute?
    Select correct option:
    sleep()
    wait()
    notify()
    yield()
    Question:41
    From the following which session tracking technique is used when new session is started?
    Select correct option:
    Cookies
    URL Rewriting
    Both Cookies and URL Rewriting
    None of these
    Question:42
    Which of the following object is used for sharing resources among different servlets of same
    application?
    Select correct option:
    ServletConfig
    ServletRequest
    ServletResponse
    ServletContext
    Question:43
    Which of the following interface needs to implement while creating threads?
    Select correct option:
    Serializable
    Runnable
    ActionListener
    WindowListener

    Question:44
    Session Tracking is done through following techniques?
    Select correct option:
    Cookies
    Hidden fields
    URL Rewriting
    Cookies, Hidden fields and URL Rewriting
    Question:45
    Servlets are used to
    Select correct option:
    Create graphics
    Provide dynamic web contents which extend web servers
    Develop applets
    Create GUI
    Question:46
    Which of the following is/are not correct about Thread(s)?
    Select correct option:
    Light weight
    Heavy weight
    Share same memory
    Light weight and share same memory
    Question:47
    From following which code can be used to create session object in the Servlet:
    Select correct option:
    HttpSession session = req.getSession(true);
    HttpSession session = req.getSession(false);
    HttpSession session = req.getSession(1);
    HttpSession session = req.setSession(1);
    Question:48
    JVM assigns CPU to the threads based on __________.
    Select correct option:
    Thread priorities
    System priorities
    Collective priorities
    Both System and Collective priorities
    Question:49
    Which of the following method is called only once during life cycle of Servlet?
    Select correct option:
    service()
    init()
    destroy()
    start()
    Question:50
    HTTP is a ---------protocol.
    Select correct option:
    Stateless
    Connectionless
    Connection oriented
    Both Connectionless and Stateless
    Question:51
    Which of the following is NOT true about HTTP?
    Select correct option:
    HTTP is a stateless protocol
    HTTP is a request response communication model
    HTTP maintains user session between successive requests.
    HTTP has no built-in state management between successive requests.
    Question:52
    Why we use RequestDispatcher to forward a request to another resource(servlet, html, jsp), instead of
    using a sendRedirect()?
    Select correct option:
    sendRedirect() is not supported in servlet API.
    RequestDispatcher is not supported in servlet API.
    RequestDispatcher is efficient and allows the server to maintain request status.
    None of these not sure
    Question:53
    getParameters() method returns an array of strings containing the values for a specified servlet
    parameter.
    Select correct option:
    True
    False
    Question:54
    Which of the following is not the part of http response?
    Select correct option:
    Result Code
    Header files
    Status code
    URI
    Question:55
    web.xml is a ___________
    Select correct option:
    java file
    configuration file
    jar file
    servlet file

    Question:56
    A ______ is a small text file used by servers to store pieces of data on a client for later retrieval.
    Select correct option:
    session
    cookie
    URL rewriting
    Session object
    Question:57
    HttpSession stores session information in
    Select correct option:
    File system of client
    File system of server
    A cookie
    A session object not sure
    Question:58
    Which of the following is NOT a part of HTTP request?
    Select correct option:
    Request method
    URI
    Status code
    Header fields
    Question:59
    Which of the following folder contains configuration file?
    Select correct option:
    classes
    lib
    bin
    WEB-INF
    Question:60
    Which of the following problem occurs with lower priority threads?
    Select correct option:
    Race condition
    Starvation
    Average waiting time
    Process death
    Question:61
    Which of the following approch is used to create threads in java?
    Select correct option:
    inheritance
    interface
    Both inheritance and interface
    None of these

    Question:62
    Which of the following method needs to override while handling threads in java?
    Select correct option:
    init()
    start()
    run()
    runnable()
    Question:63
    From the following packages which one is used to write the servlets?
    Select correct option:
    javax
    java
    java.util
    java.lang
    Question:64
    Servlets are used to
    Select correct option:
    Create graphics
    Provide dynamic web contents which extend web servers
    Develop applets
    Create GUI
    Question:65
    getrequest() method gets information from a client and postrequest() method posts data to a
    client.
    Select correct option:
    False
    True
    Question:66
    JSP scripting elements is/are
    Select correct option:
    Declarations
    Scriptlets
    expressions
    All of these
    Question:67
    From following methods; which method is not a part of the JSP life cycle?
    Select correct option:
    jspInit()
    jspService()
    _jspService()
    jspDestroy()

    Question:68
    From the following which one is not a JSP directive?
    Select correct option:
    page
    include
    taglib
    out
    Question:69
    To provide global control of JSP we use following tag
    <%@ %> right Answer)
    <%-- -%>
    <%! %>
    <%= %>
    Question:70
    javax.servlet.jsp.PageContext, is used to give a ---------point of access to many of the page
    attributes.
    Select correct option:
    Single
    Multiple
    Question:71
    In JSP Instance variables and method are declared through following tag
    Select correct option:
    <%@ %>
    <%-- --%>
    <%! %>
    <%= %>
    Question:72
    Which of the following approach is also called page-with-bean approach.
    Select correct option:
    Page-Centric approach
    MVC Model1
    MVC Model2
    MVC Model3

    Question:73
    A separate controller is a part of which of the following approach?
    Select correct option:
    Page-Centric approach
    MVC Model1
    MVC Model2
    MVC Model3
    Question:74
    From following tags, which one is the Special JSP tag?
    Select correct option:
    <jsp: .…. />
    <%! %>
    <%= %>
    <%@ %>
    Question:75
    JSTL stands for __.
    JavaServer Pages Standard Tag Library
    JavaSrvlet Pages Standard Tag Library
    Java Pages Standard Tag Library
    Question:76
    JSP page is a ---------------document that describes how to process a request to create a response.
    Text
    XML
    Both
    None
    Question:77
    A java program that has some design conventions is called

    java sevlet
    jsp
    jsf
    javabean

    Question:78
    Which of the following is not included in simple tag while creating JSP custom tags?
    Select correct option:
    Start of tag
    End of tag
    Attributes
    None of these
    Question:79
    Which of the following represent state of the components in MVC?
    Model
    View
    Control
    Both Model and View
    Question:80
    A user defined component that is used to perform certain action is called______.
    Select correct option:
    Built-in Tags
    JSP action element
    Custom tag not sure
    jsp:useBean
    Question:81
    A Tier represents the _______ view of application.
    Select correct option:
    Physical
    Logical
    Biological
    Local
    Question:82
    Which of the following is the best choice as a controller in MVC Model Architecture?
    Select correct option:
    Java
    Servlet
    JavaScript
    JSP

    Question:83
    . The HTTP response values in the range __________ specify that the request was successful.
    100-199
    200-299
    300-399
    400-499
    Question:84
    With the help of _____________ we can better organize our files into different directories.
    Classes
    Interfaces
    Session
    Packages
    Question:85
    . Entire JSP page gets translated into a servlet ____________.
    Once (pg 323)
    Every time when it is accessed
    Every time when the page is refreshed
    Every time when the browser is restarted
    Question:86
    A bean class ___________ have a zero argument constructor.
    Can
    Can’t
    Must (pg 356)
    Shouldn’t
    Question:87
    . Layers represent the _____________ view of application.
    Physical
    Logical (pg 435)
    External
    None of these
    Question:88
    High coupling makes classes difficult or impossible to reuse because _____________.
    They are independent of other classes
    They depend on so many other classes
    They have limited functionality
    They are not properly implemented
    Question:89
    _____________ is a standard web based application framework.
    Java

    Servlet
    JSP
    JSF
    Question:90
    Which of the following is a correct order for Bean scope in JSP page from most visible to least
    visible?
    application, session, request, page
    page, request, session, application
    session, page, request, application
    application, session, page, request
    Question:91
    The dot operator in Expression Language is typically used for accessing the --------------------of
    an object.
    Properties (pg 458)
    Elements
    Values
    Attributes
    Question:92
    Initialization parameters of a servlet are defined in __________ file.
    html
    JSP
    web.xml (pg 275)
    servlet
    Question:93
    On every request from the client, the server creates a new ________ and calls the _______
    method.
    thread, service()
    thread, init()
    process, service()
    process, init()
    Question:94
    . By ____________, the original request can be forwarded to the next servlet.
    request dispatching
    response redirection
    both request dispatching and response redirection
    None of the given options
    Question:95
    Which of the following is NOT appropriate for Page-centric approach?
    The maintenance of the application becomes a nightmare.

    A lot of code is also get duplicated.
    Scaling of such kind of application is easy. (pg 397)
    The code becomes a mixture of presentation, business and data access logic.
    Question:96
    Which of the following ‘statement’ object is used for executing precompiled SQL statements?
    Statement
    PreparedStatement (pg 147)
    CallableStatement
    None of the given options
    Question:97
    RPC stands for
    Remote Personal Computer (RPC)
    Remote Procedure Client
    Remote Procedure Calls (RPC).
    None of the given options
    Question:98
    . UDDI stands for
    Universal Description, Discovery & Integration (UDDI) (pg490)
    Universal Data, Discovery & Integration (UDDI)
    Universal Data, Database & Integration (UDDI)
    None of the given options
    Question:99
    Managed Beans have _______ Model
    Declarative
    Sequential
    Iterative
    None of the given options (pg465) Managed beans represent the data model
    Question:100
    DataBaseMetaData object can be derived from ___________ object.
    ResultSet
    Connection (pg165)
    Statement
    ResultSetMetaData
    Question:101
    DSN stands for ___________.
    Domain System Name
    Data Source Name (pg150)
    Database System Name
    Database Simple Name

    Question:102
    From following functions which function is invoked first?
    paint()
    paintComponet( )
    paintBorder( )
    paintChildern( )
    Question:103
    There is/are _____ form(s) of response redirection.
    1
    2 (pg 270)
    3
    4
    Question:104
    Expression is a code fragment which returns ___________.
    Integer
    String (pg326)
    Depends on the expression
    Nothing
    Question:105
    The dot operator in Expression Language is typically used for accessing the --------------------of
    an object.
    Properties (pg458)
    Elements
    Values
    Attributes
    Question:106
    The sleep(int time) method causes the currently executing thread to wait for the time specified
    in --------------
    Milliseconds (pg221)
    Nenoseconds
    Seconds
    Minutes
    Question:107
    Java was developed in………
    1990
    1994
    1995
    1996

    Question:108
    CREATE TABLE, DROP TABLE, and ALTER TABLE etc are -----------.
    DML statements
    DDL statements(pg144)
    DCL statements
    None of given options
    Question:109
    Extra sheet can be appended to URL using _________
    i. Extra path information
    ii. Added Parameters
    iii. Custom Change
    iv. All of the given options
    Question:110
    Initialization ________ of web application are also called ______________
    i. Parameters, Context Attributes not sure
    ii. Context Attributes, Parameters
    iii. Parameters, Variables
    iv. Context Attributes, Variables
    Question:111
    J2EE is developed for which of the following application
    i. Very large applications
    ii. GUI based applications
    iii. Mobile devices
    iv. Network based applications
    Question:112
    ODBC stands for ______________
    i. Open database communication
    ii. Open database connection
    iii. Open database connectivity
    iv. Open database Commission
    Question:113
    Which of the following command is used to compile Java code?
    i. java filename
    ii. javac filename.java
    iii. javac filename
    iv. java filename.java

    Question:114
    What if the main method is declared as private?

    1. The program does not compile
    2. The program compiles but does not run
    3. The program compiles and runs properly
    4. The program throws an exception on compile time
      Question:115
      Java program code is compiled into form called
    5. Machine code
    6. native Code
    7. Byte Code
    8. Source Code
      Question:116
      A top level class without any modifier is accessible to
    9. any class
    10. any class within the same package
    11. any class within the same file
    12. any subclass of this class
      Question:117
      Overloading is _______ whereas overriding is _____
    13. Run time binding, compile time binding
    14. Late binding, compile time binding
    15. Compile time binding, run time binding
    16. Run time binding, late time binding
      Question:118
      Static methods only access ___
    17. instance variable
    18. instance method
    19. static variables and methods
    20. both static and instance members
      Question:119
      Which of the following is modifier is provided by default if no access is written explicitly?
    21. public
    22. Private
    23. Protected
    24. Default
      Question:120
      A top level class may have only the following access modifier.
    25. Package
    26. Private
    27. Protected
    28. Public

    Question:121
    Which of the following is used for inheritance in java?

    1. implements
    2. extends
    3. : (colon)
    4. inherit
      Question:122
      A collection can store …
    5. Homogenous objects
    6. Heterogeneous objects
    7. Objects as well as primitive values
    8. At most 100 objects
      Question:123
      Window frame and dialog use ________ as their default layout.
    9. Border layout
    10. Flow layout
    11. GridBag layout
    12. Grid layout
      Question:124
      There are _________ types of exceptions in Java
    13. 2
    14. 3
    15. 4
    16. 5
      Question:125
      Which of the following belongs to a category of checked exception?
    17. Null Pointer exception
    18. IOException
    19. Array index out of bounds
    20. NumberFormatException
      Question:126
      Which of the following exception belongs to a category of un-checked exception?
    21. IOException
    22. Null Pointer exception
    23. AWTException
    24. ClassNotFoundException

    Question:127
    All the exceptions and errors in java are inherited from _____ class.

    1. Exception
    2. Error
    3. Throwable
    4. IOException
      Question:128
      Exceptions must be handled while handling files otherwise it may lead to _____
    5. Logical error
    6. Syntax error
    7. Run-time error
    8. No error
      Question:129
      Which of the following package needs to be import while handling files?
    9. java.util
    10. java.io
    11. java.awt
    12. javax.swing
      Question:130
      When defining a method you must include a/an … to declare any exception that
      might be thrown but is not caught in the method:
    13. try block
    14. finally block
    15. catch block
    16. throws clause
      Question:131
      Which of the following syntax is used to attach an input stream to console ?
    17. FileReader fr = new FileReader(’ input.txt ') ;
    18. FileReader fr = new FileReader(FileDescriptor.in);
    19. FileReader fr = new FileReader(FileDescriptor);
    20. FileReader fr = new FileReader(console);
      Question:132
      The classes which contain the word _____ are byte oriented streams.
    21. Reader
    22. Writer
    23. Stream
    24. Byte

    Question:133
    Which of the following stream read/write data in the form of bytes?

    1. FileReader
    2. FileWriter
    3. PrintWriter
    4. FileInputStream
      Question:134
      Which of the following is called ’ pure abstract class ’ ?
    5. Concrete class
    6. Wrapper class
    7. Interface
    8. Abstract class with no abstract method
      Question:135
      Which of the following is true about abstract class?
    9. An abstract class must have all methods declared as abstract methods.
    10. A class must have at least one abstract method to be an abstract class.
    11. A class without any abstract method can be declared as abstract class.
    12. An instance of abstract class can be created.
      Question:136
      Which of the following stream is a filter stream?
    13. FileWriter
    14. FileReader
    15. BufferedReader
    16. All of given options
      Question:137
      An instance of abstract class cannot be created.
    17. TRUE
    18. FALSE
      Question:138
      Anabstractclass ---------------instantiated.
    19. Cannot be
    20. Can be
    21. Must
    22. None of these
      Question:139
      The relationship between class and interface is called ________
    23. ’ Is a ’ relationship
    24. ’ Has a ’ relationship
    25. ’ Responds to ’ relationship

    Question:140
    BorderLayout is the default layout manager for a JFrame content pane

    1. TRUE
    2. FALSE
      Question:141
      Which of the following is a general purpose container?
    3. JFrame
    4. Dialog
    5. JPanel
    6. JApplet
      Question:142
      JPanel and Applet use ________ as their default layout.
    7. Flow layout
    8. Border layout
    9. Grid layout
    10. GridBag layout
      Question:143
      Which of the following is true about AWT and SWING components?
    11. AWT components creates a process whereas SWING component creates a
      thread.
    12. AWT components creates a thread whereas SWING component creates a
      process.
    13. Both AWT and SWING component creates a process.
    14. Both AWT and SWING component creates a thread.
      Question:144
      Which of the following function will be used to register event handler with events
      generator (button)?
    15. addAction()
    16. addActionListener()
    17. addListener()
    18. registerListener()
      Question:145
      Event source can have --------- listeners registered on it.
    19. Single
    20. Double
    21. Triple
    22. Multiple

    Question:146
    If a class needs to handle events generated by button then which of the following
    interface a class needs to implement?

    1. ComponentListener
    2. KeyListener
    3. MouseListener
    4. ActionListener
      Question:147
      Which of the following function is declared in MouseMotionListener interface?
      public void mousePressed (MouseEvent me);
    5. public void mouseDragged (MouseEvent me);
    6. public void mouseClicked (MouseEvent me);
    7. public void mouseEntered (MouseEvent me);
      Question:148
      WindowListener interface contains _______ methods.
    8. Four
    9. Six
    10. Seven
    11. Eight
      Question:149
      Mouse events can be trapped for ________ GUI component.
    12. JPanel
    13. JFrame
    14. JButton
    15. All of given
      Question:150
      Adapter classes have been defined for listener interfaces except ______ interface.
    16. MouseListener
    17. KeyListener
    18. WindowListener
    19. ActionListener
      Question:151
      Which of the following package needs to import while interacting with relational
      database?
    20. java.io
    21. java.sql
    22. javax.swing
    23. java.awt

    Question:152
    Which of the following method is used to execute SELECT SQL statements?

    1. executeUpdate(sql);
    2. ExecuteUpdate(sql);
    3. executeQuery(sql);
    4. ExecuteQuery(sql);
      Question:153
      Which of the following method is used to execute INSERT, UPDATE and Delete SQL
      statements?
    5. executeQuery(sql);
    6. ExecuteQuery(sql);
    7. executeUpdate(sql);
    8. ExecuteUpdate(sql);
      Question:154
      Which of the following statement object is used to execute stored procedures?
    9. Statement
    10. PreparedStatement
    11. CallableStatement
    12. None of given options
      Question:155
      HahMap takes key as a/an _________
    13. Object
    14. Array
    15. Primitive value
    16. Function
      Question:156
      A …defines the way and method of communication between two parties
    17. Compiler
    18. Protocol
    19. Tool
    20. Technique
      Question:155
      To create DataBaseMetaData object we write following line of code
      DataBaseMetaData db = con.getMeataData();
    21. ResultSetMetaData rsmd = rs.getMetaData();
    22. ResultSetMetaData rsmd = rs.setMetaData();
    23. DataBaseMetaData db = con.setMeataData();

    Question:156
    Which of the following are passed as an argument to the paint () method:

    1. A Canvas object2. A Graphics object3. An Image object4. A paint objectQuestion:157
      The code below draws a line. What color is the
      line?g.setColor(Color.red.green.yellow.red);g.drawLine(0, 0, 100,100);
    2. Red
    3. Green
    4. Yellow
    5. Black
      Question:158
      Which of the following methods are invoked by the AWT to support paint and repaint
      operations?
    6. paint( )
    7. repaint( )
    8. draw( )
    9. redraw( )
      Question:159
      If a super class method is protected then overriding method _________
    10. must be protected
    11. must be public
    12. must be private
    13. may be either protected or public
      Question:160
      Socket is a --------------communication channel between hosts.
    14. Uni-directional
    15. Bi-directional
    16. Multi-directional
    17. None of these
      Question:161
      You can ---------to a network using sockets.
    18. Read
    19. Write
    20. Read/Write
    21. None of these

    Question:162
    A serializable class must implement the method(s)…

    1. readObject and writeObject
    2. Either readObject or writeObject, or both, depending upon the desired behavior
    3. No need to implement any method:
    4. None of the given option
      Question:163
      Aside from the Scanner class, which of the following class/es can be used for text file
      file input
    5. ObjectInputStream
    6. BufferedReader
    7. StringTokenizer
    8. None of these
      Question:164
      In which of the following application we do not need to maintain sessions
    9. Cause registering web application
    10. Web based shopping carts
    11. Web reputation systems
    12. Windows shopping systems


Quiz 100% Result Quiz 100% Result
| |