如题!!

解决方案 »

  1.   

    是什么意思啊?
    你要得到关键字 比如 public interface 之类的么?可以使用Class类的 getModifiers方法 ,还有该类的Filed 的getModifiers方法 ,method的getModifiers方法。返回的关键字大概是public、protected、private、final、static、abstract 和 interface 。你可以自己研究一下吧,主要是你描述不清楚。如果清晰的话可以给你点建议。
      

  2.   

    java关键字都是预先定义好的,就那么多,你要怎么验证,一一验证吗
      

  3.   

    数据类型关键字  int  double  long  byte  short  float  char  String  boolean
    循环关键字  for  continue   do... while
    条件关键字  if  else  switch...case
    异常关键字  throw  throws  try  catch  finally
    类定义关键字  class  extends  implements  interface  
    修饰符和访问关键字  public  private  protected  abstract  static  final  transient  native  
    其它关键字  new  void   false  true  null  return  this  super  import  package  break  default  synchronized  instanceof  volatile  
      

  4.   

    是在eclipse 插件开发中要实现个功能,比如在一个对话框里输入一个变量名,要对它进行 java关键字验证,不能使用java关键字命名,就是验证java 48个关键字!