How do I get the last character of a string?

public class Main {
    public static void main(String[] args)  {
        String s = "test string";
        //char lastChar = ???
    }   
}

11 Answers
11

Leave a Reply

Your email address will not be published. Required fields are marked *