Class is just like a blueprint or sketch of how the objects should look like. Classes names can be in mixed cases but should start with a capital letter and do not use acronyms like HTML, URL.
Example: Class MyFirstProgram
Classes can have three types of variables like local variables, instance variables, and class variables.
Local variables are initialized in the method or functions in a class.
Instance variables are those initialized outside methods or functions but inside a class.
Class variables are those initialized outside the method but in a class with the static keyword before the variable.
public class Dog {
String breed;
int age;
String color;
void barking() {
}
void sleeping() {
}
}
If you are interested in Java, you can enroll this Java course by intellipaat.
You can watch this video on Java for a detailed explanation: