首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

class 的一些常识

2012-12-21 
class 的一些知识public class Class_test { /*** @param args*/ public static void main(String[] args)

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;} 
?

热点排行