In my programm there is a very strange problem. Here you can see String birthday and Log to check it:
birthday = String.valueOf(bir
I should like to provide the 2017 answer. For Android, first get the ThreeTenABP library. Instructions are in this question: How to use ThreeTenABP in Android Project. Then the rest is as straightforward as:
LocalDate birthDate = LocalDate.of(birthYear, birthMonth, birthDay);
System.out.println("Birth date : " + birthDate);
This prints:
Birth date : 1999-10-15
When you’ve got the year, month and day of month as numbers, there is no need to do any parsing, that would just complicate things.
ThreeTenABP is the backport of java.time or JSR-310, the modern Java date and time API, to Android Java 7. If you are using Java 8 or later, java.time is built-in. There is also a backport for (non-Android) Java 6 and 7: ThreeTen Backport.