Java String截取

String name="1.zip";
System.out.println(name.substring(name.lastIndexOf(".")));  -> .zip

你可能感兴趣的:(java)