- 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
Samual Sam has Published 2492 Articles
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
137 Views
Use the getValueX() method to get a value from Unit Tuple class in Java at a particular index. For example, getValue0().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 ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
196 Views
You need to use ORDER BY clause to sort. The syntax is as follows −SELECT *FROM yourTableName ORDER BY yourColumnName='yourValue' DESC, yourIdColumnName;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table SortCertainValues -> ( -> Id ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
153 Views
The current ticking value in minutes can be obtained using the method tickMinutes() in the Clock Class in Java. This method requires a single parameter i.e. the time zone and it returns the current ticking value in minutes.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
39 Views
The minute of the hour for a particular LocalDateTime can be obtained using the getMinute() method in the LocalDateTime class in Java. This method requires no parameters and it returns the minute of the hour in the range of 0 to 59.A program that demonstrates this is given as follows ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
75 Views
The offset of the first element of the buffer inside the buffer array is obtained using the method arrayOffset() in the class java.nio.ShortBuffer. If the buffer backed by the array is read-only, then the ReadOnlyBufferException is thrown.A program that demonstrates this is given as follows −Example Live Demoimport java.nio.*; import java.util.*; ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
89 Views
Let us first see what we need to work with JavaTuples. To work with Triplet class in JavaTuples, you need to import the following package −import org.javatuples.Triplet;Note − Steps to download and run JavaTuples program If you are using Eclipse IDE to run Triplet Class in JavaTuples, then Right Click ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
610 Views
For distinct numbers, use Set, since all its implementations remove duplicates −Setset = new LinkedHashSet();Now, create a Random class object −Random randNum = new Random();Generate 10 distinct random numbers now with nextInt of the Random class −while (set.size() < 10) { set.add(randNum.nextInt(10)+1); }Exampleimport java.util.LinkedHashSet; import java.util.Random; import java.util.Set; public ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
110 Views
The hash code value of the LocalDateTime can be obtained using the hashCode() method in the LocalDateTime class in Java. This method requires no parameters and it returns the hash code value of the LocalDateTime.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class Demo { ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
171 Views
The current instance of the clock for the required zoneID can be obtained using the method system() in Clock Class in Java. This method requires a single parameter i.e. the zoneID or the time zone and it returns the current instance of the clock for that time zone.A program that ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
134 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