How to get dob as an input from user along with a name in an array? In java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

How to get dob as an input from user along with a name in an array? In java

After getting the dob and name I just want to retrieve the stored names in the array by specifying the range of dob of those names For example : if I specify from date as 23/10/1992 and to date as 27/3/1995 I just want to display all the names within that range I want to do this in java by using core Java concept using arrays without databases r jdbc can anyone help me?

23rd Nov 2018, 5:08 AM
viki
viki - avatar
8 Answers
+ 9
I assume you're using Array of object, that contains attribute name, and dob. As the input, create an input like ussual. Now create a parser to format the date SimpleDateFormat parser= new SimpleDateFormat("dd/MM/yyyy"); Date date1= parser.parse(input); Now you cam compare the date in array and the date in input using the Date object
23rd Nov 2018, 5:40 AM
Taste
Taste - avatar
+ 3
Guys keep the Q&A programming related :) https://www.sololearn.com/discuss/1316935/?ref=app
24th Nov 2018, 9:50 AM
Taste
Taste - avatar
0
Tq buddy
23rd Nov 2018, 6:06 AM
viki
viki - avatar
0
Hi
25th Nov 2018, 2:25 AM
MARIAM
MARIAM - avatar
0
Hello
9th Dec 2018, 10:20 AM
Barnes Victor
- 1
Hii
23rd Nov 2018, 8:45 PM
Murshid Risvi
Murshid Risvi - avatar
- 1
Hello from Horn of Africa, @Somaliland
24th Nov 2018, 9:45 AM
Zaki
- 3
Hi
23rd Nov 2018, 7:39 PM
Mr virus
Mr virus - avatar