

MCQOPTIONS
Saved Bookmarks
This section includes 32 Mcqs, each offering curated multiple-choice questions to sharpen your Master of Science in Information Technology (MSc IT) knowledge and support exam preparation. Choose a topic below to get started.
1. |
Which of the following method call is valid to obtain the server's hostname by invoking an applet? |
A. | getCodeBase().host() |
B. | getCodeBase().getHost() |
C. | getCodeBase().hostName() |
D. | getCodeBase().getHostName() |
Answer» C. getCodeBase().hostName() | |
2. |
In the following URL, identify the protocol identifier? https://mcqmate.com:8080/course.php |
A. | http |
B. | gtu.ac.in |
C. | //mcqmate.com:80/course.php |
D. | 8080 |
Answer» B. gtu.ac.in | |
3. |
Which of the following protocols is/are for splitting and sending packets to an address across a network? |
A. | TCP/IP |
B. | FTP |
C. | SMTP |
D. | UDP |
Answer» B. FTP | |
4. |
Which of these is a protocol for breaking and sending packets to an address across a network? |
A. | TCP/IP |
B. | DNS |
C. | Socket |
D. | Proxy Server |
Answer» B. DNS | |
5. |
In the socket programming, for an IP address, which can be used to find the host name and 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 | |
6. |
Which of the following holds data retrieved from a database after you execute an SQL query using Statement objects? |
A. | ResultSet |
B. | JDBC driver |
C. | Connection |
D. | Statement |
Answer» B. JDBC driver | |
7. |
Which of the following type of JDBC driver should be used if your Java application is accessing multiple types of databases at the same time? |
A. | Type 1 |
B. | Type 2 |
C. | Type 3 |
D. | Type 4 |
Answer» D. Type 4 | |
8. |
To create an InputStream on a socket, say s, which of the following statement is necessary? |
A. | InputStream in = new InputStream(s); |
B. | InputStream in = s.getInputStream(); |
C. | InputStream in = s.obtainInputStream(); |
D. | InputStream in = s.getStream(); |
Answer» C. InputStream in = s.obtainInputStream(); | |
9. |
The ResultSet.next method is used to move to the next row of the ResultSet, making it the current row. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» B. False | |
10. |
Which interface in spring is responsible for Instantiating and managing the so called Spring beans? |
A. | Bean Factory |
B. | ApplicationContext |
C. | BeanDefenition |
D. | BeanDefenition |
Answer» C. BeanDefenition | |
11. |
JDBC RowSet is the wrapper of ResultSet,It holds tabular data like ResultSet but it is easy and flexible to use. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» B. False | |
12. |
Which result set generally does not show changes to the underlying databasethat are made while it is open. The membership, order, and column values ofrows 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 | |
13. |
For cross field validation or some sort of barrier to ensure state before you start a flow, we use. |
A. | FacesContext |
B. | FaceletContext |
C. | FacesResolver |
D. | All of the mentioned |
Answer» B. FaceletContext | |
14. |
Component which additionally provides a pop-up date picker control for its enclosed input field. |
A. | clientDateValidator |
B. | clientValidator |
C. | dateValidator |
D. | validator |
Answer» B. clientValidator | |
15. |
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 | |
16. |
Which of these class is necessary to implement datagrams?DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE - 45PROF . SUPRIYA MANE www.dacc.edu.in |
A. | datagrampacket |
B. | datagramsocket |
C. | all of the mentioned |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
17. |
How is the dynamic interception of requests and responses to transform the information done? |
A. | servlet container |
B. | servlet config |
C. | servlet context |
D. | servlet filter |
Answer» E. | |
18. |
Which are the session tracking techniques? i. URL rewriting ii. Using session object iii.Using response object iv. Using hidden fields v. Using cookies vi. Using servlet object |
A. | i, ii, iii, vi |
B. | i, ii, iv, v |
C. | i, vi, iii, v |
D. | i, ii, iii, v |
Answer» C. i, vi, iii, v | |
19. |
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 | |
20. |
JavaServer Pages often serve the same purpose as programs implemented using the Common Gateway Interface (CGI) |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» B. False | |
21. |
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 | |
22. |
Which of the scripting of JSP not putting content into service method of the converted servlet? |
A. | Declarations |
B. | Scriptlets |
C. | Expressions |
D. | None of the above |
Answer» D. None of the above | |
23. |
JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you can do with Java servlets. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» B. False | |
24. |
Which cookie it is valid for single session only and it is removed each time when 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 | |
25. |
Sessions is a part of the SessionTracking and it is for maintaining the client state at server side. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» B. False | |
26. |
The sendRedirect() method of HttpServletResponse interface can be used to redirect response to another resource, it may be servlet, jsp or html file |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» B. False | |
27. |
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() | |
28. |
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. | |
29. |
What is the reason that a java program cannot directly communicate with an ODBC driver? |
A. | ODBC written in C# language |
B. | ODBC written in C language |
C. | ODBC written in C++ language |
D. | None of the above |
Answer» C. ODBC written in C++ language | |
30. |
Which is a one-way communication only between the client and the server and itis not a reliable and there is no confirmation regarding reaching the message tothe destination? |
A. | tcp/ip |
B. | udp |
C. | both a & b |
D. | none of the above |
Answer» C. both a & b | |
31. |
Which of the following are interface?1. ServletContext2. Servlet3. GenericServlet4. HttpServlet |
A. | 1,2,3,4 |
B. | 1,2 |
C. | 1,2,3 |
D. | 1,4 |
Answer» C. 1,2,3 | |
32. |
Which of the following code is used to get an attribute in a HTTP Session object in servlets? |
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) | |