Inner classes in Java allow declaring a class within another class or method. This provides tighter coupling between the inner and outer classes, as the inner class can directly access attributes and methods of the outer class. There are four types of inner classes: non-static nested classes, static nested classes, anonymous classes, and local classes.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
30 views
Java Keywords
Inner classes in Java allow declaring a class within another class or method. This provides tighter coupling between the inner and outer classes, as the inner class can directly access attributes and methods of the outer class. There are four types of inner classes: non-static nested classes, static nested classes, anonymous classes, and local classes.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
http://www.indiabix.
com/java-programming/inner-classes/
Java Keywords or Reserved Words (52)for jdk1.4
abstract do if package synchronized boolean double implements private this break else import protected throw byte extends instanceof public throws case false int return transient catch final interface short true char finally long static try class float native strictfp void const for new super volatile continue goto null switch while default assert
Keywords for data types are:
boolean byte char int long short float double
Keywords for access control are:
private protected public
Keywords for modifiers are:
abstract final native private protected public static transient synchronized volatile strictfp See Modifier
Keywords for catch-exception are:
try catch finally throw
Keywords for loops or decision-makers are:
break case continue default do while for switch if else
Keywords for class functions are:
class extends implements import instanceof new package return interface this throws void super