Nancy Den has Published 290 Articles

LocalTime get() method in Java

Nancy Den

Nancy Den

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

133 Views

The value of the specified field from the LocalTime can be obtained using the get() method in the LocalTime class in Java. This method requires a single parameter i.e. ChronoField that is required and it returns the value of the specified field from the LocalTime.A program that demonstrates this is ... Read More

LocalTime isAfter() method in Java

Nancy Den

Nancy Den

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

465 Views

It can be checked if a particular LocalTime is after the other LocalTime in a timeline using the isAfter() method in the LocalTime class in Java. This method requires a single parameter i.e. the LocalTime object that is to be compared. It returns true if the LocalTime object is after ... Read More

Period minusMonths() method in Java

Nancy Den

Nancy Den

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

146 Views

An immutable copy of the Period object where some months are subtracted from it can be obtained using the minusMonths() method in the Period class in Java. This method requires a single parameter i.e. the number of months to be subtracted and it returns the Period object with the subtracted ... Read More

LocalTime isBefore() method in Java

Nancy Den

Nancy Den

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

468 Views

It can be checked if a particular LocalTime is before the other LocalTime in a timeline using the isBefore() method in the LocalTime class in Java. This method requires a single parameter i.e. the LocalTime object that is to be compared. It returns true if the LocalTime object is before ... Read More

Period minusYears() method in Java

Nancy Den

Nancy Den

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

149 Views

An immutable copy of the Period object where some years are subtracted from it can be obtained using the minusYears() method in the Period class in Java. This method requires a single parameter i.e. the number of years to be subtracted and it returns the Period object with the subtracted ... Read More

How to fetch the value from a KeyValue Tuple in Java?

Nancy Den

Nancy Den

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

212 Views

To fetch the value from a KeyValue tuple in Java, use the getValue() method. Let us first see what we need to work with JavaTuples. To work with KeyValue class in JavaTuples, you need to import the following package:import org.javatuples.KeyValue;Note: Download JavaTuples Jar library to run JavaTuples program. If you ... Read More

LocalTime getHour() method in Java

Nancy Den

Nancy Den

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

673 Views

The hour of the day for a particular LocalTime can be obtained using the getHour() method in the LocalTime class in Java. This method requires no parameters and it returns the hour of the day which can range from 0 to 23.A program that demonstrates this is given as followsExample Live ... Read More

How can we retrieve time from a table in JDBC?

Nancy Den

Nancy Den

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

421 Views

The ResultSet interface provides a method named getTime() this method accepts an integer parameter representing the index of the column, (or, a String parameter representing the name of the column) from which you need to retrieve the time value. To retrieve time value from a table −Register the driver class ... Read More

Fetch the key from a KeyValue Tuple in Java

Nancy Den

Nancy Den

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

166 Views

To fetch the key from a KeyValue tuple in Java, use the getKey() method. Let us first see what we need to work with JavaTuples. To work with KeyValue class in JavaTuples, you need to import the following package:import org.javatuples.KeyValue;Note: Download JavaTuples Jar library to run JavaTuples program. If you ... Read More

How to handle Null values while working with JDBC?

Nancy Den

Nancy Den

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

2K+ Views

SQL's use of NULL values and Java's use of null are different concepts. So, to handle SQL NULL values in Java, there are three tactics you can use:Avoid using getXXX( ) methods that return primitive data types.Use wrapper classes for primitive data types, and use the ResultSet object's wasNull( ) ... Read More

Advertisements