A
class is a blueprint from which collection of objects are created.
A public class is a class which can be accessed outside the package.
Also in your question "public" is an
access modifier. A public access modifier can be accessed globally or everywhere. If we want to access a class which is “public” outside the package then we can “import” that class to particular package.