Created a new class as per given prototype, but it shows error
public class test { void Test() { System.out.println("First ever class in Core Java"); } } class trya { public static void main(String[ ] args) { test a = new test(); a.Test(); } } ..................................... This code gives the follwing error: Error: Main method not found in class test, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application ............................................................ Even though the defined prototype is : public class Animal { void bark() { System.out.println("Woof-Woof"); } } class MyClass { public static void main(String[ ] args) { Animal dog = new Animal(); dog.bark(); } } which is giving output.