⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showmethods.java

📁 《java设计模式》一书的源码
💻 JAVA
字号:
import java.lang.reflect.*;
import javax.swing.*;
// a simple example program to
//list all the methods of the JList class
//not part of the JTwoLists project

public class showMethods
{
   public showMethods()
   {
      JList list = new JList();
      Method[] methods = list.getClass().getMethods();
      for (int i = 0; i < methods.length; i++)
      {
         System.out.println(methods[i].getName());
         Class cl[] = methods[i].getParameterTypes();
         for(int j=0; j < cl.length; j++)
            System.out.println(cl[j].toString());
      }
   }
   static public void main(String argv[])
   {
      new showMethods();
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -