读书人

class 的一些常识

发布时间: 2012-12-21 12:03:49 作者: rapoo

class 的一些知识

public class Class_test { /**  * @param args  */ public static void main(String[] args) {  // TODO Auto-generated method stub  // 第一部分         Class_test test = new Class_test();         String name = test.getclass_1().getName();          System.out.println(name);         //第二部分          String method = class1.class.getMethods()[0].getName();          System.out.println(method);          //第三部分          boolean isInterface = interface1.class.isInterface();          System.out.println(isInterface);          new in<entity>(){   public entity domethod() {    // TODO Auto-generated method stub    return null;   }                     }; }  public  Class<?> getclass_1(){    return this.getClass();  }}class class1{ public void method1(){    }}interface interface1{ }interface in<T>{ T  domethod();}class entity{ public String name;} 
?

读书人网 >编程

热点推荐