Here you can find the source of basename(String s)
public static String basename(String s)
//package com.java2s; //License from project: Open Source License public class Main { public static String basename(String s) { int dot = s.lastIndexOf('.'); return s.substring(0, dot); }/* w w w . j a v a2s .com*/ }