第一种: String str = "daipogfhjoripa1"; char c = str.charAt(str.length() - 1); 第二种: str.substring(str.length()-1);