- 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
Nancy Den has Published 330 Articles
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
95 Views
The second of minute for a particular LocalTime can be obtained using the getSecond() method in the LocalTime 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 followsExample Live Demoimport ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
461 Views
The Euler cycle/circuit is a path; by which we can visit every edge exactly once. We can use the same vertices for multiple times. The Euler Circuit is a special type of Euler path. When the starting vertex of the Euler path is also connected with the ending vertex of ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
91 Views
The hash code value of the LocalTime can be obtained using the hashCode() method in the LocalTime class in Java. This method requires no parameters and it returns the hash code value of the LocalTime.A program that demonstrates this is given as followsExample Live Demoimport java.time.*; public class Demo { public ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
888 Views
The linear congruential generator is a very simple example of a random number generator. It is one of the oldest and best-known pseudorandom number generator algorithms. The function which is used in this method −Xn+1=(aXn + C) mod mwhere X is the sequence of pseudorandom values, andm,0
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
72 Views
A LocalTime object can be obtained using the seconds of the day with the ofSecondOfDay() method in the LocalTime class in Java. This method requires a single parameter i.e. the seconds of the day and it returns the LocalTime object for the seconds of the day.A program that demonstrates this ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
306 Views
The equality of two LocalTime objects can be determined using the equals() method in the LocalTime class in Java. This method requires a single parameter i.e. the LocalTime object to be compared. Also it returns true if both the LocalTime objects are equal and false otherwise.A program that demonstrates this ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
908 Views
The middle-square method is one of the simplest method of generating random numbers. this method will either begin repeatedly generating the same number or cycle to a previous number in the sequence and loop indefinitely. For a generator of ndigit random numbers, the period can be no longer than n. ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
334 Views
To iterate through the KeyValue tuple in Java, use the Iterable and loop it through using the for loop. 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 ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
383 Views
Let us first set a Period with month and days:Period p = Period.ofMonths(5).plusDays(15);Now set the LocalDate:LocalDate date = LocalDate.of(2019, 4, 10);Add period to LocalDate:LocalDate res = date.plus(p);Exampleimport java.time.LocalDate; import java.time.Period; public class Demo { public static void main(String[] args) { Period p = Period.ofMonths(5).plusDays(15); ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
Nancy Den
846 Views
Set the two Java dates:LocalDate date1 = LocalDate.of(2019, 3, 25); LocalDate date2 = LocalDate.of(2019, 4, 29);Now, get the difference between two dates with Period class between() method:Period p = Period.between(date1, date2);Now, get the years, month and days:p.getYears() p.getMonths() p.getDays()Exampleimport java.time.LocalDate; import java.time.Period; public class Demo { public static void ... Read More