[Java] 基本操作--File--获取文件扩展名 →→→→→进入此内容的聊天室

来自 , 2019-11-20, 写在 Java, 查看 109 次.
URL http://www.code666.cn/view/359f3846
  1.         public static String getExt(String path) {
  2.                 String result = null;
  3.                 try {
  4.                         result = path.substring(path.lastIndexOf(".") + 1);
  5.                 } catch (Exception e) {
  6.                         result = "";
  7.                 }
  8.                 return result;
  9.         }
  10.  

回复 "基本操作--File--获取文件扩展名"

这儿你可以回复上面这条便签

captcha