how to print java class qualified code example Example: Java print class type System.out.println(foo.getClass().getName());