I am a beginner in Java trying to write a program to convert strings into title case. For example, if String s = \"my name is milind\", then the output should b
String s = \"my name is milind\"
Code Golf variation... I challenge anyone to make it any simpler than this:
public String titleCase(String str) { return Arrays .stream(str.split(" ")) .map(String::toLowerCase) .map(StringUtils::capitalize) .collect(Collectors.joining(" ")); }