Java tutorial
//package com.java2s; public class Main { /** * Returns the simple name for the class <tt>c</tt>. * * @param c the class in question * @return the simple name for the class <tt>c</tt> */ static String simpleName(final Class c) { String s = c.getName(); int ilastDot = s.lastIndexOf("."); return ilastDot == -1 ? s : s.substring(ilastDot + 1); } }