Java tutorial
//package com.java2s; public class Main { public static String getFileNameWithoutExtension(String fileName) { return fileName.substring(0, fileName.lastIndexOf(".")); } }