Karthikeya Boyini has Published 2383 Articles

LocalDateTime withMonth() method in Java

karthikeya Boyini

karthikeya Boyini

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

40 Views

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

Create Pair Tuple in Java

karthikeya Boyini

karthikeya Boyini

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

182 Views

Let us first see what we need to work with JavaTuples. To work with Pair class in JavaTuples, you need to import the following package −import org.javatuples.Pair;Note − Steps to download and run JavaTuples program. If you are using Eclipse IDE to run Pair Class in JavaTuples, then Right Click ... Read More

ShortBuffer allocate() method in Java

karthikeya Boyini

karthikeya Boyini

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

79 Views

A new ShortBuffer can be allocated using the method allocate() in the class java.nio.ShortBuffer. This method requires a single parameter i.e. the capacity of the buffer. It returns the new ShortBuffer that is allocated. If the capacity provided is negative, then the IllegalArgumentException is thrown.A program that demonstrates this is ... Read More

LocalDateTime compareTo() method in Java

karthikeya Boyini

karthikeya Boyini

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

222 Views

Two LocalDateTime objects can be compared using the compareTo() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the LocalDateTime object to be compared.If the first LocalDateTime object is greater than the second LocalDateTime object it returns a positive number, if the first LocalDateTime object ... Read More

Java Tuple setAt0() method for Unit class

karthikeya Boyini

karthikeya Boyini

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

73 Views

The setAt0() method is used to set the Unit value in JavaTuples and a copy with a new value at index 0.Let us first see what we need to work with JavaTuples. To work with the Unit class in JavaTuples, you need to import the following package −import org.javatuples.Unit;Note − ... Read More

Can I use InnoDB and MyISAM tables in a single database in MySQL?

karthikeya Boyini

karthikeya Boyini

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

420 Views

Yes, you can use InnoDB and MyISAM tables in one database or combine both of them in a single database. This is the recommended way.Here is the demo of both MyISAM and InnoDB in a one database. The following is the database and both the table types InnoDB and MyISAM. ... Read More

LocalDateTime getNano() method in Java

karthikeya Boyini

karthikeya Boyini

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

80 Views

The nanosecond of second for a particular LocalDateTime can be obtained using the getNano() method in the LocalDateTime class in Java. This method requires no parameters and it returns the nanosecond of second in the range of 0 to 999, 999, 999.A program that demonstrates this is given as follows ... Read More

ShortBuffer array() Method in Java

karthikeya Boyini

karthikeya Boyini

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

102 Views

A short array for the buffer can be obtained using the method array() in the class java.nio.ShortBuffer. If the returned array is modified, then the contents of the buffer are also similarly modified and vice versa. If the buffer is read-only, then the ReadOnlyBufferException is thrown.A program that demonstrates this ... Read More

Java Tuples addAtX() method for Unit class

karthikeya Boyini

karthikeya Boyini

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

103 Views

The addAtX() method is used to add value to the Tuple. The index can be set here with the X i.e. the place where the value gets added.Let us first see what we need to work with JavaTuples. To work with the Unit class in JavaTuples, you need to import ... Read More

Clock withZone() method in Java

karthikeya Boyini

karthikeya Boyini

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

120 Views

A clock copy of the clock object can be obtained using the method withZone() in Clock Class in Java. This method is used on a clock object to obtain a clock copy. The withZone() method requires a single parameter i.e. the zone that is required to change the time zone. ... Read More

Advertisements