Here you can find the source of endsWithChar(CharSequence s, char suffix)
public static boolean endsWithChar(CharSequence s, char suffix)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); public class Main { public static boolean endsWithChar(CharSequence s, char suffix) { return s != null && s.length() != 0 && s.charAt(s.length() - 1) == suffix; }/* w w w . j a v a 2 s . c om*/ }