0% found this document useful (0 votes)
27 views4 pages

Marked Answers

Uploaded by

chavanjay581
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views4 pages

Marked Answers

Uploaded by

chavanjay581
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Marked Answers for Multiple Choice Questions

1. IPv6 uses ________. Answer: (d) 8 groups of 4 hexa-decimal digits each

2. Name the class which is used to create a port where the server will listen Answer: (c) ServerSocket

3. Communication using TCP protocol is ______ and ________. Answer: (d) Connection oriented, concurrent

4. Select full form of DNS. Answer: (b) Domain Name System

5. Which of these is a bundle of information passed between machines? Answer: (c) Datagram

6. Which from the below use 'Middle tier'. Answer: (a) 3 tier

7. Port number for FTP is _______ Answer: (a) 21

8. java.net package consists of interface __________ Answer: (d) All of the above

9. ________ is necessary to implement Datagram. Answer: (c) Both A & B

10. Which IP address is multicast IP address? Answer: (b) 235.55.45.2

11. A server socket can connect to ________ clients. Answer: (d) multiple

12. Which class defines following methods? int getContentLength(), long getDate(), long getExpiration() Answer: (a)

URLConnection

13. class Permission in java.security package is__________. Answer: (b) abstract

14. The __________ package contains classes that help in connecting to a database, sending SQL statements to the

database and process the query request. Answer: (d) java.sql

15. Which of the following is not a type of JDBC driver? Answer: (d) JDBC - Native pure Java Driver

16. Database programming using Java throws which of the following exception? Answer: (d) Both of these

17. _____________ is a table of data which represents a data from table. Answer: (c) ResultSet

18. Public class DriverManager extends ____________ Answer: (a) Object

19. What is purpose of next() method? Answer: (c) to retain next record in a series.
20. Which of the following method is supported by Statement interface? Answer: (d) All of above

21. Which is main component of JDBC API? Answer: (d) All of these

22. How many steps are used to connect any java application with the database using JDBC ? Answer: (b) 4

23. Native API converts ______ into the ______ used by DBMS. Answer: (b) JDBC API, Native API calls

24. Which class/interface is used for an SQL statement that is executed frequently? Answer: (c) PreparedStatement

25. The JDBC-ODBC bridge supports how many concurrent open statements per connection? Answer: (a) 1

26. Microsoft Access data in _______ file format. Answer: (b) .MDB

27. Which method executes an SQL statement that may return multiple results? Answer: (c) execute( )

28. The interface to the database is handle by _____ . Answer: (b) JDBC

29. DELETE statement of an SQL is executed by________. Answer: (c) executeUpdate( )

30. DatabaseMetadata are retrieved through___________ Answer: (b) getMetaData( )

31. Which of the following is used generally for reading the content of the database? Answer: (c) ResultSet

32. The syntax to create a table named 'Course', should begin with __________. Answer: (b) create table course

33. JSP embeds __________ in ___________. Answer: (d) Java, HTML

34. Which JSP tag is used to transfer for processing another JSP page? Answer: (b) <jsp:forward>

35. Which of the following is the default HttpRequest method? Answer: (a) doGet( )

36. Which are true about tag libraries in web application? Answer: (d) All of the above

37. Name the http method used to send resources to the server. Answer: (b) PUT method

38. The include( ) method in RequestDispatcher ____. Answer: (b) includes resources of file like servlet, JSP or html.

39. _________ is the first Phase of Servlet Life cycle. Answer: (b) init( )

40. ________ is a small piece of information that is passed back & forth in HTTP request & response. Answer: (c)

Cookie
41. Which method is used to specify before any lines that used the PrintWriter? Answer: (c) setContentType( )

42. A user types the URL http://www.msbte.com/result.php. Which request gets generated? Answer: (a) GET method

43. The following methods belongs to the life cycle methods of the servlet. Answer: (d) All of the above

44. Apache Tomcat is ________. Answer: (d) Web server capable of running Java programs

45. Servlet lifecycle has _________ states. Answer: (b) Three

46. How to send data in get method? Answer: (d) using URL

47. What is the limit of data to be passed from HTML to doGet() ? Answer: (a) 8kb

48. The major difference between Servlet and CGI is _______. Answer: (a) Servlets are thread based and CGI is

process based.

49. The authentication mechanism in the servlet specification uses a technique called ? Answer: (b) Form Based

Authentication

50. JSP stands for _______. Answer: (c) Java Server Pages

51. JSP life cycle includes following Answer: (d) All of these

52. What the getSession( ) method with 'true' parameter will do? Answer: (c) Creates new session if, the session does

not exist

53. State true or false for following statements. (i) JavaBeans slow-down software development process. (ii) Java

Servlets do not have built-in multithreaded feature. Answer: (a) false, false

54. Identify the proper syntax of doGet( ). Answer: (b) void doGet(HttpRequest req,HttpResponse res) throws

IOException, ServletException

55. Which are true about tag libraries in web application? Answer: (d) All of the above

56. An application wants to invalidate the session both programmatically and declaratively. Select the best match to do

this. Answer: (b) httpRequest.getSession( ).invalidate( ) <session-config><session-timeout> time_in_minutes

</session-timeout> </session-config>
57. The syntax to create a table named 'Course', should begin with __________. Answer: (b) create table course

58. Which kind of driver converts JDBC calls into calls on the Client API for Oracle, Sybase, Informix, IBM DB2, or other

DBMS Answer: (b) Native API partly - Java Driver

You might also like