Here is a brief summary of how to cut out characters one by one.
class Main{
public static void main(String[] args) {
    //Character string to cut out
    String text = "abcde";
    
    char[] work = new char[text.length()];
    for(int i = 0; i < text.length(); i++){
            work[i] = text.charAt(i);
            //Output the cut out character string character by character
            System.out.println(work[i]);
        	}
	}
}
a
b
c
d
e
Another option is to use substring.
Recommended Posts