- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Karthikeya Boyini has Published 2383 Articles
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
48 Views
The second of minute for a particular LocalDateTime can be obtained using the getSecond() method in the LocalDateTime class in Java. This method requires no parameters and it returns the second of the minute in the range of 0 to 59.A program that demonstrates this is given as follows −Example Live ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
53 Views
The setAt1() method is used to set the Triplet value in JavaTuples and a copy with a new value at the specified index i.e. index 1 here.Let us first see what we need to work with JavaTuples. To work with Triplet class in JavaTuples, you need to import the following ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
219 Views
Let us first create signed byte −byte signedVal = -100;Now convert a byte to an unsigned integer −int unsignedVal = Byte.toUnsignedInt(signedVal);Examplepublic class Demo { public static void main(String[] args) { byte signedVal = -100; int unsignedVal = Byte.toUnsignedInt(signedVal); System.out.println("Signed value ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
600 Views
There is no standard function to get week of month in MySQL. You need to use the following syntax −SELECT WEEK(yourDateColumnName, 5) - WEEK(DATE_SUB(yourDateColumnName, INTERVAL DAYOFMONTH(yourDateColumnName) - 1 DAY), 5) + 1 AS anyAliasName FROM yourTableName;To understand the above syntax, let us create a table. The query to create a ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
68 Views
A read-only short buffer can be created using the contents of a buffer with the method asReadOnlyBuffer() in the class java.nio.ShortBuffer. The new buffer cannot have any modifications as it is a read-only buffer. However, the capacity, positions, limits etc. of the new buffer are the same as the previous ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
203 Views
The instant of the base clock can be rounded off for the required duration using the method tick() in the Clock Class in Java. This method requires two parameters i.e. the base clock and the duration of the tick. Also, the instant of the base clock rounded off for the ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
65 Views
To search a value in Unit class in JavaTuples, use the contains() method.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 − Steps to download and run JavaTuples program If you ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
711 Views
Let’s say the following are the two dates for which we want the milliseconds difference −LocalDateTime dateOne = LocalDateTime.now(); LocalDateTime dateTwo = LocalDateTime.of(2019, 4, 10, 11, 20);Now, get the milliseconds between the above two dates with MILLIS.between −long res = MILLIS.between(dateOne, dateTwo);Exampleimport java.time.LocalDateTime; import static java.time.temporal.ChronoUnit.MILLIS; public class Demo { ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
138 Views
You can achieve this with the help of ORDER BY CASE statement. The syntax is as follows −SELECT *FROM yourTableName ORDER BY CASE yourIntegerColumnName1 WHEN 2 THEN 1 ELSE 0 END DESC ,yourDateColumnName ASC;To understand the above syntax, let us create a table. The query to create a table is ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
163 Views
The iteration through Unit in JavaTuples is like what you may have seen in Java Arrays collection.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 − Steps to download and run ... Read More