Nancy Den has Published 290 Articles

MonthDay equals() method in Java

Nancy Den

Nancy Den

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

136 Views

The equality of two MonthDay objects can be determined using the equals() method in the MonthDay class in Java. This method requires a single parameter i.e. the MonthDay object to be compared. Also it returns true if both the MonthDay objects are equal and false otherwise.A program that demonstrates this ... Read More

Convert Character Array to IntStream in Java

Nancy Den

Nancy Den

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

605 Views

Let’s say the following is our character array:Character arr[] = { 'V', 'e', 'h', 'i', 'c', 'l' , 'e' };To convert the above character array to IntStreamIntStream stream = Stream.of(arr).flatMapToInt(IntStream::of);We have used the flatMapToInt() method for this.The following is an example to convert character array to IntStream in Java:Example Live Demoimport ... Read More

MonthDay getDayOfMonth() method in Java

Nancy Den

Nancy Den

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

117 Views

The day of the month for a particular MonthDay can be obtained using the getDayOfMonth() method in the MonthDay class in Java. This method requires no parameters and it returns the day of the month which can be in the range of 1 to 31.A program that demonstrates this is ... Read More

Convert String to IntStream in Java

Nancy Den

Nancy Den

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

348 Views

If you have a string and you want to convert it into IntStream with ASCII values, then it can be easily achieved using the below code.To work with IntStream class, you need to import the following package:import java.util.stream.IntStream;Let’s say the following is our string:String str = "Benz";Convert the above string ... Read More

What is Statement in JDBC?

Nancy Den

Nancy Den

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

901 Views

The Statement interface represents the static SQL statement, it is used to create and execute general purpose SQL statements using Java programs.Creating a statementYou can create an object of this interface using the createStatement() method of the connection interface. Create a statement by invoking this method as shown below.Statement stmt ... Read More

MonthDay atYear() method in Java

Nancy Den

Nancy Den

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

90 Views

The MonthDay can be combined with a year to create a LocalDate using the atYear() method in the MonthDay class in Java. This method requires a single parameter i.e.the year and it returns the LocalDate created by combining MonthDay with the year.A program that demonstrates this is given as follows:Example Live ... Read More

What is PreparedStatement in JDBC?

Nancy Den

Nancy Den

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

12K+ Views

The PreparedStatement interface extends the Statement interface it represents a precompiled SQL statement which can be executed multiple times. This accepts parameterized SQL quires and you can pass 0 or more parameters to this query.Initially this statement uses place holders “?” instead of parameters, later on you can pass arguments ... Read More

MonthDay from() method in Java

Nancy Den

Nancy Den

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

70 Views

An instance of a MonthDay object can be obtained from a Temporal object using the from() method in the MonthDay class in Java. This method requires a single parameter i.e. the Temporal object and it returns the MonthDay object that is obtained from the Temporal object.A program that demonstrates this ... Read More

Comparison of memory-mapped I/O and I/O-mapped I/O

Nancy Den

Nancy Den

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

2K+ Views

In Memory Mapped Input Output −We allocate a memory address to an Input-Output device.Any instructions related to memory can be accessed by this Input-Output device.The Input-Output device data are also given to the Arithmetic Logical Unit.Input-Output Mapped Input Output −We give an Input-Output address to an Input-Output device.Only IN and ... Read More

What is CallableStatement in JDBC?

Nancy Den

Nancy Den

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

8K+ Views

The CallableStatement interface provides methods to execute the stored procedures. Since the JDBC API provides a stored procedure SQL escape syntax, you can call stored procedures of all RDBMS in single standard way.Creating a CallableStatementYou can create an object of the CallableStatement (interface) using the prepareCall() method of the Connection ... Read More

Advertisements