The right output but no validation! Any hint? Tk you!
package com.codegym.task.task08.task0823;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Going national
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
String[] list=s.split("\\s+");
for(int i=0; i<list.length; i++){
System.out.print(list[i].substring(0,1).toUpperCase()+list[i].substring(1).toLowerCase()+" ");
}
}
}