how to find the last character in a string java code example
Example: check last character of string java
String str = "India";
System.out.println("last char = " + str.charAt(str.length() - 1));
String str = "India";
System.out.println("last char = " + str.charAt(str.length() - 1));