Servlets/Servlets MCQ QUESTIONS AND ANSWER Sample Test,Sample questions

Question:
	
Which JDBC product components does the Java software provide?

1.The JDBC driver manager

2.The JDBC driver test suite

3. The JDBC-ODBC bridge

4.All mentioned above

Posted Date:-2024-02-16 16:32:33


Question:
	
Which of the following is correct about JDBC?

1.JDBC architecture decouples an abstraction from its implementation.

2. JDBC follows a bridge design pattern

3. Both of the above

4.None of the above.

Posted Date:-2024-02-16 16:29:51


Question:
	
Which of the following step establishes a connection with a database?

1. Import packages containing the JDBC classes needed for database programming.

2. Register the JDBC driver, so that you can open a communications channel with the database.

3.Open a connection using the DriverManager.getConnection () method

4.Execute a query using an object of type Statement.

Posted Date:-2024-02-16 16:30:18


Question:
A leading database connectivity vendor, worked together to produce the ____.

1.JDBC-ODBC Bridge

2.JDBC Driver Test Suite

3.Both A & B

4.None of the above

Posted Date:-2024-02-16 16:36:33


Question:
How many Result sets available with the JDBC 2.0 core API?

1.2

2. 3

3. 4

4.5

Posted Date:-2024-02-16 16:31:56


Question:
In the following JDBC drivers which is known as fully java driver?

1.Native-API driver

2.Network Protocol driver

3.Thin driver

4.Both B & C

Posted Date:-2024-02-16 16:34:13


Question:
In the following URL, identify the protocol identifier? https://mcqmate.com:8080/course.php

1.http

2.gtu.ac.in

3.//mcqmate.com:80/course.php

4.8080

Posted Date:-2024-02-16 16:19:04


Question:
In the socket programming, for an IP address, which can be used to find the host name and IP address of a client/ server?

1.The ServerSocket class

2.The Socket class

3.The InetAddress class

4.The Connection interface

Posted Date:-2024-02-16 16:23:54


Question:
JDBC is a Java API that is used to connect and execute query to the database

1.True

2.False

3.none

4.all

Posted Date:-2024-02-16 16:33:50


Question:
The client requests a connection to a server using which of the following statement?

1.Socket s = new Socket(ServerName, port);

2.Socket s = serverSocket.accept();

3.Socket s = serverSocket.getSocket()

4.Socket s = new Socket(ServerName);

Posted Date:-2024-02-16 16:22:38


Question:
The JDBC API is what allows access to a data source from a Java middle tier

1.True

2.False

3.none

4.all

Posted Date:-2024-02-16 16:38:03


Question:
To connect to a server running on the same machine with the client, which of the following cannotbe used for the hostname?

1.localhost

2."127.0.0.1"

3.InetAddress.getLocalHost(),

4.127.0.0.0

Posted Date:-2024-02-16 16:23:08


Question:
To create an InputStream on a socket, say s, which of the following statement is necessary?

1.InputStream in = new InputStream(s);

2.InputStream in = s.getInputStream();

3.InputStream in = s.obtainInputStream();

4.InputStream in = s.getStream();

Posted Date:-2024-02-16 16:24:24


Question:
To create an InputStream on a socket, say s, which of the following statement is necessary?

1.InputStream in = new InputStream(s);

2.InputStream in = s.getInputStream();

3.InputStream in = s.obtainInputStream();

4.InputStream in = s.getStream();

Posted Date:-2024-02-16 16:24:24


Question:
What is the reason that a java program cannot directly communicate with an ODBC driver?

1.ODBC written in C# language

2.ODBC written in C language

3.ODBC written in C++ language

4.None of the above

Posted Date:-2024-02-16 16:36:13


Question:
Which class has traditionally been the backbone of the JDBC architecture?

1.the JDBC driver manager

2.the JDBC driver test suite

3.the JDBC-ODBC bridge

4.All mentioned above

Posted Date:-2024-02-16 16:33:00


Question:
Which class has traditionally been the backbone of the JDBC architecture?

1.the JDBC driver manager

2.the JDBC driver test suite

3.the JDBC-ODBC bridge

4.All mentioned above

Posted Date:-2024-02-16 16:33:01


Question:
Which driver converts JDBC calls directly into the vendor-specific database protocol?

1.Native - API driver

2.Network Protocol driver

3.Thin driver

4.Both B & C

Posted Date:-2024-02-16 16:36:54


Question:
Which driver uses ODBC driver to connect to the database?

1.JDBC-ODBC bridge driver

2.Native - API driver

3.Network Protocol driver

4.Thin driver

Posted Date:-2024-02-16 16:38:23


Question:
Which JDBC drivers will run your program?

1.The JDBC-ODBC bridge

2.The JDBC driver manager

3.The JDBC driver test suite

4.None of the above

Posted Date:-2024-02-16 16:35:47


Question:
Which models do the JDBC API support for the database access?

1.Two-tier models

2.Three-tier models

3.Both A & B

4.None of the above

Posted Date:-2024-02-16 16:37:19


Question:
Which of the following holds data retrieved from a database after you execute an SQL query using Statement objects?

1.ResultSet

2.JDBC driver

3.Connection

4.Statement

Posted Date:-2024-02-16 16:26:50


Question:
Which of the following is not a valid type of ResultSet?

1.ResultSet.TYPE_FORWARD_ONLY

2.ResultSet.TYPE_SCROLL_INSENSITIVE

3.ResultSet.TYPE_SCROLL_SENSITIVE

4.ResultSet.TYPE_BACKWARD_ONLY

Posted Date:-2024-02-16 16:27:30


Question:
Which of the following is true about JDBC?

1. The JDBC API is an API to access different relational databases.

2.You use it to access relational databases without embedding a dependency on a specific database type in your code.

3.JDBC stands for Java DataBase Connectivity.

4.All of the above.

Posted Date:-2024-02-16 16:30:43


Question:
Which of the following manages a list of database drivers in JDBC?

1.DriverManager

2.JDBC driver

3.Connection

4.Statement

Posted Date:-2024-02-16 16:28:25


Question:
Which of the following protocols is/are for splitting and sending packets to an address across a network?

1.TCP/IP

2.FTP

3.SMTP

4.UDP

Posted Date:-2024-02-16 16:24:47


Question:
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?

1.Type 1

2.Type 2

3.Type 3

4.Type 4

Posted Date:-2024-02-16 16:28:49


Question:
Which of the following type of JDBC driver, is also called Type 1 JDBC driver?

1.JDBC-ODBC Bridge plus ODBC driver

2.Native-API, partly Java driver

3.JDBC-Net, pure Java driver

4.Native-protocol, pure Java driver

Posted Date:-2024-02-16 16:26:19


Question:
Which of these class is used to encapsulate IP address and DNS?

1.DatagramPacket

2.URL

3.InetAddress

4.ContentHandler

Posted Date:-2024-02-16 16:25:35


Question:
Which of these package contains classes and interfaces for networking?

1.java.io

2.Java.util

3.java.net

4.javax.swing

Posted Date:-2024-02-16 16:18:25


Question:
Which was the first most widely used programming interface for accessing relational databases and it offers the ability to connect all the databases on all the platforms.?

1.JDBC API

2.ODBC API

3.Both A & B

4.None of the above

Posted Date:-2024-02-16 16:33:29


More MCQS

  1. Servlets - Java (MCQ) questions
  2. Servlets MCQ QUESTIONS AND ANSWER
  3. Servlets Advanced JAVA MCQ QUESTIONS AND ANSWER
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!