知识补充:endsWith() 方法用于测试字符串是否以指定的后缀结束。更多学习视频推荐:java语言入门实例: String dirName = "D:worktemptemp0temp1"; public