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\"
You can use lamda instead-
String titalName = Arrays.stream(names.split(" ")) .map(E -> String.valueOf(E.charAt(0))+E.substring(1)) .reduce(" ", String::concat);