public class MainClass{ public static void main(String[] arg){ String str = "abcdea"; int index = 0; index = str.lastIndexOf('a'); System.out.println(index); } }
5