Samual Sam has Published 2492 Articles

LocalDateTime withHour() method in Java

Samual Sam

Samual Sam

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

33 Views

An immutable copy of a LocalDateTime with the hour altered as required is done using the method withHour() in the LocalDateTime class in Java. This method requires a single parameter i.e. the hour that is to be set in the LocalDateTime and it returns the LocalDateTime with the hour altered ... Read More

LocalDateTime withMinute() method in Java

Samual Sam

Samual Sam

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

22 Views

An immutable copy of a LocalDateTime with the minutes altered as required is done using the method withMinute() in the LocalDateTime class in Java. This method requires a single parameter i.e. the minute that is to be set in the LocalDateTime and it returns the LocalDateTime with the minute altered ... Read More

ShortBuffer slice() method in Java

Samual Sam

Samual Sam

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

76 Views

A new ShortBuffer with the content as a shared subsequence of the original ShortBuffer can be created using the method slice() in the class java.nio.ShortBuffer. This method returns the new ShortBuffer that is read-only if the original buffer is read-only and direct if the original buffer is direct.A program that ... Read More

Create Quintet Tuple from Array in Java

Samual Sam

Samual Sam

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

62 Views

To create Quintet Tuple from an Array, use the fromArray() method.Let us first see what we need to work with JavaTuples. To work with Quintet class in JavaTuples, you need to import the following package −import org.javatuples.Quintet;Note − Steps to download and run JavaTuples program. If you are using Eclipse ... Read More

LocalDateTime from() method in Java

Samual Sam

Samual Sam

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

48 Views

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

How do I cast a type to a BigInt in MySQL?

Samual Sam

Samual Sam

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

5K+ Views

You need to use the CAST operator along with CONV() function. The CONV() function can be used to convert one base number system to another base system.For Example, The 16 is one base system and 10 is another base system. The 16 base system is hexadecimal and 10 is a ... Read More

Provider values() method in Java

Samual Sam

Samual Sam

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

73 Views

The property values in the Provider can be viewed with an unmodifiable Collection view that is obtained using the method values() in the class java.security.Provider. This method requires no parameters and it returns an unmodifiable Collection view of the property values.A program that demonstrates this is given as follows −Example Live ... Read More

Create Unit Tuple from Array in Java

Samual Sam

Samual Sam

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

103 Views

To create Unit Tuple from array, use the fromArray() method.Let us first see what we need to work with JavaTuples. To work with Unit class in JavaTuples, you need to import the following package −import org.javatuples.Unit;Note − Steps to download and run JavaTuples program. If you are using Eclipse IDE ... Read More

ShortBuffer compact() method in Java

Samual Sam

Samual Sam

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

77 Views

The buffer can be compacted using the compact() method in the class java.nio.ShortBuffer. This method does not require a parameter and it returns the new compacted ShortBuffer with the same content as the original buffer. If the buffer is read-only, then the ReadOnlyBufferException is thrown.A program that demonstrates this is ... Read More

LocalDateTime getMonth() method in Java

Samual Sam

Samual Sam

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

170 Views

The month name for a particular LocalDateTime can be obtained using the getMonth() method in the LocalDateTime class in Java. This method requires no parameters and it returns the month name in the year.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class Demo {   ... Read More

Advertisements