JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class Main
{
public static void main(String[] args) {
String myLine = "hello, my name is Sahel!";
String[] splitLine = myLine.split(" ");
for (int i=0; i<splitLine.length; i++) {
char[] replace = splitLine[i].toCharArray();
replace[0] = 'q';
splitLine[i] = String.valueOf(replace);
}
for (String s: splitLine)
System.out.print(s + " ");
}
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run