31.2k views
5 votes
Complete the following method that takes a String parameter that is a date in the European form. For example, the parameter might contain "30-11-2003", which would be November 30, 2003 in European form.

This method returns a String with the same date in American form. For example, given the parameter in the example above, the method should return "11/30/2003".

public static String convertDate(String euroDate)
{


}
help please

User Nabel
by
5.9k points

2 Answers

4 votes

Answer:

^^^^^^

Step-by-step explanation:

User Vikash Kumar Verma
by
5.9k points
1 vote
You can break this string apart in subString[s] with the hyphen being a delimiter. You could also use a scanner object.
User Ev
by
6.5k points