T - 由此 Class 对象建模的类的类型.例如,String.class 的类型是Class<String>.如果将被建模的类未知,则使用Class<?>. public final class Class<T> extends Object implements java.io.Serializable, java.lang.reflect.GenericDeclaration, java.lang.reflect.Type, java.lang.refle
public static void main(String[] args) { File f = new File("c://test.jpg"); if (f.exists()) { System.out.println(getFormatInFile(f)); } } // Returns the format of the image in the file 'f'. // Returns nul