In each java program you have to create classes and in the main function of java you have to create objects of the classes.
You can write a c++ program without creating a class but you have to create class and objects in java program that why java is called "purely" object oriented programming language.
All concepts like inheritance, modularity, polymorphism, and encapsulation in coop are supported by java.