Accessing String Characters : String Start End « Data Type « Java Tutorial






public class MainClass{

  public static void main(String[] arg){
    String str = "abcde";
    
    System.out.println(str.charAt(2));
  }

}
c








2.20.String Start End
2.20.1.Checking the Start of a String
2.20.2.Checking the End of a String
2.20.3.Accessing String Characters
2.20.4.Chop i characters off the end of a string.
2.20.5.Removes separator from the end of str if it's there, otherwise leave it alone.
2.20.6.Remove the last character from a String.