Snippets tagged “filenameutils”
1 snippet uses this tag.
- How do I get the file extension of a file in Java?Java
To get the file extension of a file in Java, you can use the File class and its getName() method to get the file name, and then use the substring() method of the String class to extract the extension from the file name.