Nancy Den has Published 335 Articles

What are batch updates in JDBC? Explain?

Nancy Den

Nancy Den

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

812 Views

Grouping a set of INSERT or, UPDATE or, DELETE commands (those produce update count value) and execute them at once this mechanism is known as a batch update.Adding statements to the batchThe statement, PreparedStatement, and CallableStatement objects hold a list (of commands) to which you can add related statements (those ... Read More

LongStream iterator() method in Java

Nancy Den

Nancy Den

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

96 Views

The iterator() method of the LongStream class in Java returns an iterator for the elements of this stream.The syntax is as follows.PrimitiveIterator.OfLong iterator()Here, PrimitiveIterator is an Iterator specialized for long values.To use the LongStream class in Java, import the following package.import java.util.stream.LongStream;The following is an example to implement LongStream iterator() ... Read More

What are the disadvantages of ODBC drivers?

Nancy Den

Nancy Den

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

959 Views

Beside its advantages, ODBC has several drawbacks. Following are the main drawbacks of ODBC.Keeps on changing: ODBC is provided by Microsoft and like other Microsoft products it keeps evolving and the companies using ODBC should keep up with it. In addition to this, you need to pay to use ODBC ... Read More

What is Parameterized Batch Update in JDBC? Explain with an example?

Nancy Den

Nancy Den

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

630 Views

Grouping a set of INSERT or, UPDATE or, DELETE commands (those produce update count value) and execute them at once this mechanism is known as a batch update.If you pass quires with parameters using batch update it is known as a parameterized batch update.Generally, to perform batch updates you need ... Read More

How to insert rows into a ResultSet in JDBC?

Nancy Den

Nancy Den

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

804 Views

You can retrieve the contents of a table as a ResultSet and, insert a new row to it directly. To do so, first of all, you need to make sure your ResultSet is updatable.The moveToInsertRow() method of the ResultSet interface navigates the cursor to the position where you need to ... Read More

What is JDBC?

Nancy Den

Nancy Den

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

336 Views

JDBC stands for Java Database Connectivity. It is a Java library/specification released by sun microsystems. It enables Java applications to communicate with databases.A JDBC driver is an implementation of the above-mentioned specification i.e. it contains the classes and interfaces to communicate with the database. Using JDBC driver and JDBC API ... Read More

How to create KeyValue Tuple in Java?

Nancy Den

Nancy Den

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

154 Views

To create a KeyValue tuple in Java, you can use the with() method, collection or simply the constructor. Here, we will see how to create a KeyValue tuple using a constructor. Let us first see what we need towork with JavaTuples. To work with KeyValue class in JavaTuples, you need ... Read More

IntStream parallel() method in Java

Nancy Den

Nancy Den

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

369 Views

The parallel() method of the IntStream class in Java returns an equivalent parallel stream. The method may return itself, either because the stream was already parallel, or because the underlying stream state was modified to be parallel.The syntax is as follows:IntStream parallel()Create an IntStream and you can use the range() ... Read More

LongStream parallel() method in Java

Nancy Den

Nancy Den

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

84 Views

The parallel() method of the LongStream class in Java returns an equivalent stream that is parallel.The syntax is as follows:LongStream parallel()To use the LongStream class in Java, import the following packageExample Live Demoimport java.util.stream.LongStream;The following is an example to implement LongStream parallel() method in Java:import java.util.stream.LongStream; public class Demo {   ... Read More

LongStream mapToObj() method in Java

Nancy Den

Nancy Den

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

104 Views

The LongStream mapToObj() method is used in Java to return an object-valued Stream consisting of the results of applying the given function to the elements of this stream.The syntax is as follows: StreammapToObj(LongFunction

Advertisements