indzi
1/12/2016 - 12:24 PM

Getting specific character from specific place of a string

Getting specific character from specific place of a string

//charAt method will pick the specific character of the string of position number of j

for (int j = 0; j < halfString.length(); j += 2) {
    char finalOutPutChar = halfString.charAt(j);
    finalOutPut = finalOutPut + finalOutPutChar;
}