String fileName = "jasmine.jpeg";
String fileNameWithoutExtension = fileName.split("\\.")[0];
String extension = fileName.split("\\.")[1];
System.out.println("File Name Without Extension: "+fileNameWithoutExtension);
System.out.println("Extension: "+extension);
String fileNameWithoutExtension = fileName.split("\\.")[0];
String extension = fileName.split("\\.")[1];
System.out.println("File Name Without Extension: "+fileNameWithoutExtension);
System.out.println("Extension: "+extension);
No comments:
Post a Comment