why we use classes in Java?
class meant for encapsulation & abstraction in Java. That means your code is capsulated into a single unit called class. class helps programmer to permit the access of his/her code written in the class I.e abstraction.
Read about Object Oriented Programming and it will help make more sense. Java, C#, and most OOP language use classes to represent objects.
because of oop