Author name: Shruti Agarwal

How to Get Filename Without Extension in Java

This article will talk about how to get filename without extension in Java language. The file utility method helps you to get rid of the file extension from the file name. Here is an example. Program: class substring { public static void main(String[] args) { String fileName = “myfile.java”; if(!fileName.contains(“.”)) System.out.println(“File Name = ” + …

How to Get Filename Without Extension in Java Read More »