Classes Java and other Object-Orientated Programs or OOP are based on the creation and interaction of classes. Every program in Java has at least one class.