keep gettin 2 error messages
(1)The field greeting cannot be declared static; static fields can only be declared in static or top level types
this is what the code looks like
public class comment {
/**
* @author Craig
*
* This class demonstrates use of:<br>
* Line Comments<br>
* Block Comments<br>
* JavaDoc Comments.<br>
*/
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 for the purpose
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);
}
}
}