I am writing a method to take a DOB of 3 integers - day, month, year and return the formatted version DD/MM/YYYY.
I am currently using dateFormatter and simple date form
Why use formatter? just do this:
public String DateOfBirth(int day, int month, int year)
{
String DOB = day + "/" + month + "/" + year;
return DOB;
}
If it's for an assignment, the teacher probably wants you to not use formatter.
Also, as someone else mentioned: If you are trying to concatenate integers as a string you need some string in between. Otherwise you are summing the values of the integers.