Can you please tell me how to modify this code (taken directly from the
SCJP Sun Certified Programmer for
Java 6 Study Guide (Exam 310-065) book) so it executes?
I keep getting the error message java.lang.NoSuchMethodError: main
Exception in
thread "main" when I try to execute the examples from this book. I am told it's because the code doesn't include the main method, but I haven't found any information on what the correct syntax is for including the main methods and the other methods in the class. Here is the code -- any advice on how to modify it would be appreciated. Other examples that only include the main method have worked when I've executed them so I don't think this is an issue with my Classpath.
class Zoo {public
String coolMethod(){
return "Wow baby";
}
}