数据类型关键字 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
你要得到关键字 比如 public interface 之类的么?可以使用Class类的 getModifiers方法 ,还有该类的Filed 的getModifiers方法 ,method的getModifiers方法。返回的关键字大概是public、protected、private、final、static、abstract 和 interface 。你可以自己研究一下吧,主要是你描述不清楚。如果清晰的话可以给你点建议。
循环关键字 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