1 File file = new File("config.ini");
2 String suffix = file.getName().substring(file.getName().lastIndexOf(".") + 1);
3 if(suffix.equals("ini")) {
4     //true
5 }  else {
6     //false
7 }

 

相关文章:

  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
猜你喜欢
  • 2021-09-28
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
相关资源
相似解决方案