QB CT2 AJP
QB CT2 AJP
QB CT2 AJP
Covered: CO4,CO5,CO6
SUBJECT: Advance Java Programming
QUESTION BANK (CO COVERED CO 4,5,6)
11. In JDBC, which exception is thrown when there is a problem with the SQL syntax?
a) SQLException b) SQLSyntaxException c) SQLQueryException d) SyntaxError
12. Which method is used to execute a query in JDBC and retrieve the results in a `ResultSet`?
a) executeQuery() b) executeUpdate() c) execute() d) executeBatch()
26.Name the class which is used to create a port where the server will listen.
A)Server B)Socket
C)ServerSocket D) SocketServer
27. What does the acronym "HTTP" stand for in the context of web communication?
A. Hyperlink Transfer Protocol B. Hypertext Transfer Protocol
C. Hyper Transfer Text Protocol D. High-Speed Text Protocol
28. In Java, which class is commonly used to establish a server socket for network
communication?
A. Socket B. ServerSocket C. DatagramSocket D. InetAddress
31. Which Java package provides classes for working with sockets and networking?
A. java.net B. java.io C. java.lang D. java.util
32.The URLConnection class can be used to read and write data to the specified
resource referred by the URL?
A) True B)False
38. Which protocol is typically used for sending email in Java applications?
A. HTTP B. FTP C. SMTP D. POP3