java get class name without package name code example Example: getting class name in java a.getClass().getName();