Hi,
I successfully integrated the classes given from OOP-1 assignment. However, I am looking at the programming part of it and I am struggling to separate the input date.
Here is my way of solving it on paper:
java DaysOld 2002-1-2
I want to separate the number between dashes so I can extract the year, month, day. I can use indexOf to find what the index of every dashes but I cannot find a method under
String to get char up to the next dash, then next number to dash, etc.
Can someone help?
Garry