MCQOPTIONS
Saved Bookmarks
This section includes 218 Mcqs, each offering curated multiple-choice questions to sharpen your BBA in Computer Applications knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
Which packages does a JSP API consist of? |
| A. | javax.servlet.jsp |
| B. | java.servlet |
| C. | javax.servlet.jsp.tagext |
| D. | Both A & C |
| Answer» E. | |
| 52. |
Which method is used to send the same request and response objects to another servlet inRequestDispacher ? |
| A. | forward() |
| B. | sendRedirect() |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. sendRedirect() | |
| 53. |
The difference between Servlets and JSP is the ……………. |
| A. | translation |
| B. | compilation |
| C. | syntax |
| D. | Both A and B |
| Answer» D. Both A and B | |
| 54. |
Which of the following is correct about JDBC? |
| A. | JDBC architecture decouples an abstraction from its implementation. |
| B. | JDBC follows a bridge design pattern. |
| C. | Both of the above. |
| D. | None of the above. |
| Answer» D. None of the above. | |
| 55. |
JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you cando with Java servlets. |
| A. | True |
| B. | False |
| C. | none |
| D. | all |
| Answer» B. False | |
| 56. |
Which packages represent interfaces and classes for servlet API? |
| A. | javax.servlet |
| B. | javax.servlet.http |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 57. |
Which object of HttpSession can be used to view and manipulate information about asession? |
| A. | session identifier |
| B. | creation time |
| C. | last accessed time |
| D. | All mentioned above |
| Answer» E. | |
| 58. |
Which class has traditionally been the backbone of the JDBC architecture? |
| A. | the JDBC driver manager |
| B. | the JDBC driver test suite |
| C. | the JDBC-ODBC bridge |
| D. | All mentioned above |
| Answer» B. the JDBC driver test suite | |
| 59. |
Which interface in spring is responsible for Instantiating and managing the so calledSpring beans? |
| A. | Bean Factory |
| B. | ApplicationContext |
| C. | BeanDefenition |
| D. | BeanDefenition |
| Answer» C. BeanDefenition | |
| 60. |
Which of the following JDBC drivers is known as a partially java driver? |
| A. | JDBC-ODBC bridge driver |
| B. | Native-API driver |
| C. | Network Protocol driver |
| D. | Thin driver |
| Answer» C. Network Protocol driver | |
| 61. |
Which cookie it is valid for single session only and it is removed each timewhen the user closes the browser? |
| A. | persistent cookie |
| B. | non-persistent cookie |
| C. | all the above |
| D. | none of the above |
| Answer» C. all the above | |
| 62. |
Which are the examples of Application Server? |
| A. | Apache |
| B. | Tomcat |
| C. | JBoss |
| D. | Weblogic |
| Answer» D. Weblogic | |
| 63. |
The sendRedirect() method of HttpServletResponse interface can be used to redirectresponse to another resource, it may be servlet, jsp or html file |
| A. | True |
| B. | False |
| C. | none |
| D. | all |
| Answer» B. False | |
| 64. |
What will happen if two thread of the same priority are called to be processedsimultaneously? |
| A. | anyone will be executed first lexographically |
| B. | both of them will be executed simultaneously |
| C. | none of them will be executed |
| D. | it is dependent on the operating system |
| Answer» E. | |
| 65. |
Which of the scripting of JSP not putting content into service method of theconverted servlet? |
| A. | declarations |
| B. | scriptlets |
| C. | expressions |
| D. | none of the above |
| Answer» B. scriptlets | |
| 66. |
In the following URL, identify the protocol identifier? https://gtu.ac.in:8080/course.php |
| A. | http |
| B. | gtu.ac.in |
| C. | //gtu.ac.in:80/course.php |
| D. | 8080 |
| Answer» B. gtu.ac.in | |
| 67. |
Which of these variables stores the number of hits that are successfully servedout of cache? |
| A. | hits |
| B. | hitstocache |
| C. | hits_to_cache |
| D. | hits.to.cache |
| Answer» E. | |
| 68. |
In JSP page directive which attribute defines theMIME(MultipurposeInternet Mail Extension) type of the HTTP response? |
| A. | import |
| B. | content type |
| C. | extends |
| D. | info |
| Answer» C. extends | |
| 69. |
Which methods are used to bind the objects on HttpSession instance andgetthe objects? |
| A. | setattribute |
| B. | getattribute |
| C. | both a & b |
| D. | none of the above |
| Answer» D. none of the above | |
| 70. |
Which of these method of httpd class is used to get report on each hit to HTTPserver? |
| A. | log() |
| B. | logentry() |
| C. | loghttpd() |
| D. | logresponse() |
| Answer» C. loghttpd() | |
| 71. |
Which of the following protocol follows connection less service? |
| A. | TCP |
| B. | TCP/IP |
| C. | UDP |
| D. | HTTP |
| Answer» D. HTTP | |
| 72. |
Which of the following type of JDBC driver should be used if your Java application isaccessing multiple types of databases at the same time? |
| A. | Type 1 |
| B. | Type 2 |
| C. | Type 3 |
| D. | Type 4 |
| Answer» D. Type 4 | |
| 73. |
Which type of ServletEngine is a server that includes built-in support forservlets? |
| A. | add-on servletengine |
| B. | embedded servletengine |
| C. | standalone servletengine |
| D. | none of the above |
| Answer» D. none of the above | |
| 74. |
JDBC facilitates to store the java objects by using which of the methods ofPreparedStatementsetObject () 2. setBlob() 3. setClob() |
| A. | 1, 2 |
| B. | 1,2,3 |
| C. | 1,3 |
| D. | 2,3 |
| Answer» C. 1,3 | |
| 75. |
In a RMI Client Program, what are the exceptions which might have tohandled? |
| A. | remoteexception |
| B. | notboundexception |
| C. | malformedurlexception |
| D. | all mentioned above |
| Answer» E. | |
| 76. |
Which of the following methods are needed for loading a database driver inJDBC? |
| A. | registerdriver() method |
| B. | class.forname() |
| C. | both a and b |
| D. | getconnection() |
| Answer» D. getconnection() | |
| 77. |
Which of the following are interface? 1. ServletContext 2. Servlet 3. GenericServlet 4. HttpServlet |
| A. | 1,2,3,4 |
| B. | 1,2 |
| C. | 1,2,3 |
| D. | 1,4 |
| Answer» C. 1,2,3 | |
| 78. |
Which of the following is true about HQL? |
| A. | HQL takes java objects in the same way as SQL takes tables. |
| B. | HQL is a Object Oriented Query language |
| C. | HQL is database independent. |
| D. | All of the above. |
| Answer» E. | |
| 79. |
Which of these class is used to access actual bits or content information of aURL? |
| A. | url |
| B. | urldecoder |
| C. | urlconnection |
| D. | all of the mentioned |
| Answer» E. | |
| 80. |
URL encoding is the method of replacing all the spaces and other extracharacters into their corresponding _______ Characters? |
| A. | hex |
| B. | binary |
| C. | octal |
| D. | decimal |
| Answer» B. binary | |
| 81. |
A leading database connectivity vendor, worked together to produce the ____. |
| A. | JDBC-ODBC Bridge |
| B. | JDBC Driver Test Suite |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 82. |
The ResultSet.next method is used to move to the next row of the ResultSet, making it thecurrent row. |
| A. | True |
| B. | False |
| C. | none |
| D. | all |
| Answer» B. False | |
| 83. |
Why DB connections are not written directly in JSPs? |
| A. | Response is slow |
| B. | Not a standard J2EE architecture |
| C. | Load Balancing is not possible |
| D. | Both B and C |
| Answer» E. | |
| 84. |
In the following JDBC drivers which is known as fully java driver? |
| A. | Native-API driver |
| B. | Network Protocol driver |
| C. | Thin driver |
| D. | Both B & C |
| Answer» E. | |
| 85. |
Servlets handle multiple simultaneous requests by using threads. |
| A. | True |
| B. | False |
| C. | none |
| D. | all |
| Answer» B. False | |
| 86. |
Which action tags are used in JSP for developing web application with JavaBean? |
| A. | jsp:usebean |
| B. | jsp:setproperty |
| C. | jsp:getproperty |
| D. | both b & c |
| Answer» E. | |
| 87. |
In the socket programming, for an IP address, which can be used to find the host nameand IP address of a client/ server? |
| A. | The ServerSocket class |
| B. | The Socket class |
| C. | The InetAddress class |
| D. | The Connection interface |
| Answer» D. The Connection interface | |
| 88. |
Which driver converts JDBC calls directly into the vendor-specific database protocol? |
| A. | Native - API driver |
| B. | Network Protocol driver |
| C. | Thin driver |
| D. | Both B & C |
| Answer» D. Both B & C | |
| 89. |
Which HTTP Request method is non-idempotent? |
| A. | GET |
| B. | POST |
| C. | Both A & B |
| D. | None of the above |
| Answer» D. None of the above | |
| 90. |
Which of the following statements is false as far as different type ofstatements is concern in JDBC? |
| A. | regular statement |
| B. | prepared statement |
| C. | callable statement |
| D. | interim statement |
| Answer» E. | |
| 91. |
Which of the following type of JDBC driver, is also called Type 1 JDBC driver? |
| 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» B. Native-API, partly Java driver | |
| 92. |
To resolve Facelets views we configure: |
| A. | ViewFacelets |
| B. | ViewResolver |
| C. | View-resolver |
| D. | View_Resolver |
| Answer» C. View-resolver | |
| 93. |
The server listens for a connection request from a client using which of the following statement? |
| A. | Socket s = new Socket(ServerName, port); |
| B. | Socket s = serverSocket.accept() |
| C. | Socket s = serverSocket.getSocket() |
| D. | Socket s = new Socket(ServerName); |
| Answer» C. Socket s = serverSocket.getSocket() | |
| 94. |
What is the difference between servlets and applets?i. Servlets execute on Server; Applets execute on browser ii. Servlets have no GUI; Applet has GUI iii. Servlets creates static web pages; Applets creates dynamic web pages iv. Servlets can handle only a single request; Applet can handle multiple requests |
| A. | i, ii, iii are correct |
| B. | i, ii are correct |
| C. | i, iii are correct |
| D. | i, ii, iii, iv are correct |
| Answer» C. i, iii are correct | |
| 95. |
Which cookie it is valid for single session only and it is removed each time when the usercloses the browser? |
| A. | Persistent cookie |
| B. | Non-persistent cookie |
| C. | All the above |
| D. | None of the above |
| Answer» C. All the above | |
| 96. |
The life cycle of a servlet is managed by |
| A. | servlet context |
| B. | servlet container |
| C. | the supporting protocol (such as http or https) |
| D. | All of the above |
| Answer» C. the supporting protocol (such as http or https) | |
| 97. |
In HTTP Request method Get request is secured because data is exposed in URL bar |
| A. | True |
| B. | False |
| C. | none |
| D. | all |
| Answer» C. none | |
| 98. |
Which class can handle any type of request so that it is protocol-independent? |
| A. | GenericServlet |
| B. | HttpServle |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. HttpServle | |
| 99. |
Which of the following code is used to get an attribute in a HTTP Session object inservlets? |
| A. | session.getAttribute(String name) |
| B. | session.alterAttribute(String name) |
| C. | session.updateAttribute(String name) |
| D. | session.setAttribute(String name) |
| Answer» B. session.alterAttribute(String name) | |
| 100. |
Which driver Network connection is indirect that a JDBC client makes to a middleware process that acts as a bridge to the DBMS server? |
| A. | JDBC-Net |
| B. | JDBC-ODBC bridge |
| C. | Native API as basis |
| D. | Native protocol as basis |
| Answer» B. JDBC-ODBC bridge | |