Daniol Thomas has Published 197 Articles

ArrayBlockingQueue iterator() method in Java

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

232 Views

The iterator() method of the ArrayBlockingQueue class returns an iterator over the elements in this queue in proper sequence.The syntax is as follows.public Iterator iterator()To work with ArrayBlockingQueue class, you need to import the following package.import java.util.concurrent.ArrayBlockingQueue;The following is an example to implement iterator() method of Java ArrayBlockingQueue class.Example Live Demoimport ... Read More

The listIterator() method AbstractList class in Java at a specified position

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

110 Views

The listIterator() method of the AbstractList class in Java is used to return a list iterator over the elements in this list, beginning at the specified position in the list.The syntax is as follows.public ListIterator listIterator(int index)Here, index is the index of the first element to be returned from the ... Read More

The listIterator() method of AbstractList class in Java

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

125 Views

The listIterator() method of the AbstractList class in Java is used to return a list iterator over the elements in this list.The syntax is as follows.public ListIterator listIterator()Here, ListIterator is an iterator for lists.To work with the AbstractList class, import the following package.import java.util.AbstractList;For ListIterator, import the following package.import java.util.ListIterator;The ... Read More

Create Decade Tuple using with() method in Java

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

105 Views

To create a Decade Tuple in Java, you can use the with() method. Let us first see what we need to work with JavaTuples. To work with Decade class in JavaTuples, you need to import the following package.import org.javatuples.Decade;Note: Download JavaTuples Jar library to run JavaTuples program. If you are ... Read More

What is type2 driver of JDBC what are the advantages and disadvantages of it?

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

881 Views

This driver is known as a native API driver. This driver receives the calls from Java application and converts them in to vender specific native API calls. Here, we need to install The vendor-specific driver on the client machines.If we change the Database, we have to change the native API, ... Read More

What is type3 driver of JDBC what are the advantages and disadvantages of it?

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

904 Views

In a Type 3 driver, a three-tier approach is used to access databases. The JDBC clients use standard network sockets to communicate with a middleware application server. The socket information is then translated by the middleware application server into the call format required by the DBMS, and forwarded to the ... Read More

What is type4 driver of JDBC what are the advantages and disadvantages of it?

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

1K+ Views

The Type 4 driver is the pure Java driver. It implements database specific protocol to communicate with the database directly. This driver is provided by the vender itself, this is flexible driver compared to other drivers.Advantages of type4 driverFollowing are the advantages of the type4 driver.It is purely developed in ... Read More

How to establish connection with JDBC?

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

2K+ Views

To connect with a database, you need to follow the steps given below:Step1: Register the driver: To develop a basic JDBC application, first of all, you need to register the driver with the DriverManager.You can register a driver in two ways, one is using registerDriver() method of the DriverManager class ... Read More

What are the main classes and interfaces of JDBC?

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

15K+ Views

JDBC API is available in two packages java.sql, core API and javax.sql JDBC optional packages. Following are the important classes and interfaces of JDBC.Class/interfaceDescriptionDriverManagerThis class manages the JDBC drivers. You need to register your drivers to this.It provides methods such as registerDriver() and getConnection().DriverThis interface is the Base interface for ... Read More

What are the types of statements in JDBC?

Daniol Thomas

Daniol Thomas

Updated on 30-Jul-2019 22:30:25

11K+ Views

There are three types of statements in JDBC namely, Statement, Prepared Statement, Callable statement.StatementThe Statement interface represents the static SQL statement. It helps you to create a general purpose SQL statements using Java.Creating a statementYou can create an object of this interface using the createStatement() method of the Connection interface.Create ... Read More

Advertisements