Java Error can any one help
I keep getting this java error (inner class cannot have static declarations ) dont know why I just started learning Java dont know what im doing wrong. Thanks
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.event.*;
publicclass commentsextends Applet
{
/**
* @author Craig
*
* This class demonstrates use of:
* Line Comments
* Block Comments
* JavaDoc Comments.
*/
publicclass CommentsExample{
/**
* Program comments are nonexecuting,
* statements you add to a program
* documentation for the purpose
* of documentation.
*/
protectedstatic String greeting ="Hi";
//Program comments are nonexecuting,
//statements you add to a program
privatestatic String name ="Guys";//documentation
public CommentsExample(){
//of documentation.()
super();
}
/**
* This is the entry point of the application.
* main() is executed first by the JVM.
*/
publicvoid main(String[] args){
/*
* Program comments are nonexecuting,
* statements you add to a program
* documentation for the purpose
* of documentation.
*/
System.out.println(greeting +" " + name);
}
}
}

