View Single Post
Old 08-18-2006, 12:48 AM   #1 (permalink)
benzspida
Registered User
 
Join Date: Jun 2006
Posts: 10
benzspida is on a distinguished road
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



Code:
import java.applet.Applet; import java.awt.Graphics; import java.awt.event.*; public class comments extends Applet { /** * @author Craig * * This class demonstrates use of: * Line Comments * Block Comments * JavaDoc Comments. */ public class CommentsExample { /** * Program comments are nonexecuting, * statements you add to a program * documentation for the purpose * of documentation. */ protected static String greeting = "Hi"; //Program comments are nonexecuting, //statements you add to a program private static String name = "Guys"; //documentation public CommentsExample() { //of documentation.() super(); } /** * This is the entry point of the application. * main() is executed first by the JVM. */ public void main(String[] args) { /* * Program comments are nonexecuting, * statements you add to a program * documentation for the purpose * of documentation. */ System.out.println(greeting + " " + name); } } }
__________________
benzspida is offline   Reply With Quote