how to print out class name in java code example Example: getting class name in java a.getClass().getName();