String simplify 3x count and print charcters Java program

Your question looks like you want to cut a string to 3 characters.
Example:

String s = "string";
System.out.println(s.substring(0, 3));

Tell me if I misunderstood the question. Also, please reread the question, you are misleading people.

Leave a Comment