Compiler error: "class, interface, or enum expected"
Every method should be within a class. Your method derivativeQuiz
is outside a class.
public class ClassName {
///your methods
}
You forgot your class declaration:
public class MyClass {
...
You miss the class declaration.
public class DerivativeQuiz{
public static void derivativeQuiz(String args[]){ ... }
}