0% found this document useful (0 votes)
26 views5 pages

QB CT-2-1

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)
26 views5 pages

QB CT-2-1

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/ 5

1.

UDP stands for

(a) User Data Port (b) User Datagram Protocol

(c) Used Data Provider (d) User Data Protocol

Answer: b

2. Name the class which is used to create a port where the server will listen.

(a) Server (b) Socket (c) ServerSocket (d) SocketServer

Answer: c

3. Communication using TCP protocol is ……and ……..

(a) Connection less, Iterative (b) Collection less, concurrent

(c) Connection oriented, Iterative (d) Connection oriented, concurrent

Answer: d

4. Which of these is a not a factory method of InetAddress class?

(a) static InetAddress getLocalHost( ) (b) static InetAddress getByName(String hostname)

(c) static InetAddress getAllName(String hostname) (d) static InetAddress[ ] getAllByName(String hostname)
Answer: c

5. Which of these package contains classes and interfaces for networking?

A. java.io B. java.util C. java.net D. javax.swing

Answer: c

6. What does JDBC stand for? –

a) Java Database Control b) Java Database Connectivity

c) Java Data Binding Connector d) Java Database Console

Answer: b

7. Which package in Java contains the JDBC classes?

a) java.sql b) java.jdbc c) java.db d) java.connection

Answer: a

8.Which IP address is multicast IP address?

(a) 192.168.2.32 (b) 235.55.45.2 (c) 12.22.1.2 (d) None of these

Answer: b
9. Which of these is a bundle of information passed between machines?

(a) MIME (b) Cache (c) Datagram (d) Socket

Answer: c

10. Port number for FTP is

(a) 21 (b) 23 (c) 25 (d) 80

Answer: a

11. The constructor of URL can throw an exception called

(a) MalformedUrlException (b) UrlNotFoundException

(c) UrlException (d) UrlSourceNotFoundException

Answer: a

12. Which of the following is not a type of JDBC driver?

(a) 100% pure Java Driver (b) JDBC – net pure Java Driver

(c) JDBC – Native API driver (d) JDBC – Native pure Java Driver

Answer: d

13. Database programming using Java throws which of the following exception?

(a) SQLException (b) ClassNotFoundException

(c) None of these (d) Both of these

Answer: d

14. Which of these is a protocol for breaking and sending packets to an address across a network?

(a)TCP/IP (b)Socket

(c)Proxy Server (d)DNS

Answer: a

15. Public class DriverManager extends

(a) Object (b) String

(c) Connection (d) Statement

Answer: a
16. JSP embeds in …..

(a) Servlet, HTML (b) HTML, Java

(c) HTML, Servlet (d) Java, HTML

Answer: d

17. Which of the following is the default HttpRequest method?

(a) doGet( ) (b) doPost( )

(c) doTrace( ) (d) doPut( )

Answer: a

18. Which are true about tag libraries in web application?

(a) packaged in the /WEB‐INF directory or subdirectory of the WAR file

(b) If a tag is implemented as a tag file and packaged in /WEB‐INF/tags/ or a subdirectory,a TLD will be generated
automatically by the web container, though, you can provide one if you wish

(c) packaged in the /META‐INF/ directory or subdirectoryof a tag library packaged in a jar.

(d) All of the above.

Answer: d

19. Name the http method used to send resources to the server.

(a) POST method (b) PUT method

(c) WRITE method (d) COPY method

Answer: a

20. _____________is a table of data which represents a data from table.

(a) MetaData (b) ResultSetMetaData

(c) ResultSet (d) Statement

Answer: c

21. In following statement rs is an object of interface of JDBC API.

System.out.println(rs.getString(3));

(a) RowSet (b) Statement

(c) Connection (d) ResultSet


Answer: d

22. Which is main component of JDBC API?

(a) DriverManager (b) Driver

(c) Connection (d) All of these

Answer: d

23. How many steps are used to connect any java application with the database using JDBC ?

(a) 5 (b) 4

(c) 3 (d) 6

Answer: d

24. ODBC minimum SQL grammer contains

(a) Stored procedure (b) Data, Time and TimeStamp only

(c) create or drop View (d) Insert, update, delete only

Answer: d

25. Which of these method of DatagramPacket class is used to find the destination address?

(a) findAddress( ) (b) getAddress( )

(c) address( ) (d) whoIs( )

Answer: b

26. Connection oriented communication is possible using classes of Java.

(a) Socket and ServerSocket (b) DatagramSocket and DatagramPacket

(c) Both of these (d) None of these

Answer: a

27. A server socket can connect to clients.

(a) 1 (b) 2

(c) 10 (d) multiple

Answer: d

28. Resolver in DNS system maps .


(a) Domain name to IP address (b) IP address to domain name

(c) Domain name to MAC address (d) MAC address to IP address

Answer: a

29.________ is necessary to implement Datagram.

(a)DataGramPacket (b)DatagramSocket

(c)Both (d)None

Answer: c

30. A user types the URL http://www.msbte.com/result.php. Which request gets generated?

(a) GET method (b) POST method

(c) HEAD method (d) PUT method

Answer: a

31. Apache Tomcat is .

(a) Servlet (b) Java Program

(c) API (d) Web server capable of running Java programs

Answer: d

32. How many ports of TCP/IP are reserved for specific protocols?

(a) 10 (b) 1024

(c) 2048 (d) 512

Answer: b

33. The authentication mechanism in the servlet specification uses a technique called ?

(a) Role Based Authentication (b) Form Based Authentication

(c) Both a & b (d) None of the above

Answer: c

34. JSP stands for .

(a) Java Service Provider (b) Java Server Path

c) Java Server Pages (d) Java Server Program Answer: c

You might also like