Output shows me good result: ,, Sam I Am '' but it shows 4th requirment is wrong.
Does anybody has answer on that? :/
package pl.codegym.task.task08.task0823;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
String[]tablica = s.split(" ");
String s2="";
String [] tablicaDuzychZnakow = new String[tablica.length];
for(int i=0;i<tablicaDuzychZnakow.length;i++){
tablicaDuzychZnakow[i] = s2+tablica[i].charAt(0);
String bigLetter = tablicaDuzychZnakow[i].toUpperCase();
tablicaDuzychZnakow[i] = bigLetter;
}
char[]tablicaCharow = new char[tablicaDuzychZnakow.length];
for(int i=0;i<tablicaCharow.length;i++){
tablicaCharow[i] = tablicaDuzychZnakow[i].charAt(0);
}
for (int i=0;i<tablica.length;i++){
tablica[i] = tablica[i].replace(tablica[i].charAt(0),tablicaCharow[i]);
System.out.print(tablica[i]+" ");
}
}
}