filmov
tv
java hands on age calculation using LocalDate class
Показать описание
Hello everyone, and welcome to the Java Hands-On series. In today's video, we will try to get used to the LocalDate class. This class was introduced in Java 8 and provides a more intuitive and efficient way to work with dates, making it easier to perform common date-related tasks, such as parsing, formatting, comparison, and manipulation.
In this exercise we are required to write a function to deal with dates entered as a String.
We need to write a function that accept a date in a String format and calculate the age of the person. The program should output the age in this format: years, months and days. We will use the LocalDate Class.
In this exercise we are required to write a function to deal with dates entered as a String.
We need to write a function that accept a date in a String format and calculate the age of the person. The program should output the age in this format: years, months and days. We will use the LocalDate Class.