Write code to get Short Java Name from Class<?>
//package com.book2s; public class Main { public static void main(String[] argv) { Class c = String.class; System.out.println(getShortJavaName(c)); }/* w ww . j ava 2s. c o m*/ public static String getShortJavaName(Class<?> c) { String[] split = c.getName().split("\\."); return split[split.length - 1]; } }