In: Computer Science
In java:
-Create a class named Animal
As request, I have created a Java Class named Animal. If you have any doubts, please comment. I have explained further in comments.
A java program should always be saved with the class name.
Here class name is Animal, so the program should be saved like Animal.java or else it will not execute and you will end up with an error.
public class Animal{ /* To create a class, use the keyword class */
/* follwed by class name which is Animal here */
public static void main(String []args){
System.out.println("This data is inside Animal Class");
} /* this prints the give line by the user */
}
If you have any doubts, leave a comment below and I'll help you out.