Daniol Thomas has Published 212 Articles

Collectors collectingAndThen() method in Java 8

Daniol Thomas

Daniol Thomas

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

691 Views

The collectingAndThen() method in Java Collectors class acclimates a Collector to perform an additional finishing transformation. It returns collector which performs the action of the downstream collector, followed by an additional ending step.The syntax is as follows.static Collector collectingAndThen(Collector downstream, Function finisher)Here, the parameter, T − Type of the ... Read More

Collectors partitioningBy() method in Java 8

Daniol Thomas

Daniol Thomas

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

1K+ Views

The partioningBy() method returns a Collector that partitions the input elements according to a Predicate, and organizes them into a Map.The syntax is as follows.static Collector partitioningBy(Predicate

ArrayBlockingQueue iterator() method in Java

Daniol Thomas

Daniol Thomas

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

151 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

65 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

71 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

54 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

661 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

608 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

796 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

1K+ 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

Advertisements