pls what's my error..it prints out correctly
package com.codegym.task.task08.task0823;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
/*
Going national
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
//write your code here
Scanner word = new Scanner(System.in);
String s = word.nextLine();
String []arr= s.split(" ");
StringBuffer sb = new StringBuffer();
for (int a = 0;a < arr.length;a++){
sb.append(Character.toUpperCase(arr[a].charAt(0)))
.append(arr[a].substring(1)).append(" ");
}
System.out.println(sb.toString().trim());
}
}