Java class keywordA Java class keyword is the most common keyword which is used to declare a new Java class. A class is a container that contains the block of code that includes field, method, constructor, etc. A class is a template or blueprint from which objects are created. It is a logical entity. It can't be physical. Points to remember
Example 1Let's see a simple example of a class keyword. Output: Hello World Example 2In this example, we declare two classes. Output: 101 John William 25000 Example 3Let's see an example to declare the private class. Output: private class is invoked
Next TopicJava Keywords
|