Previous | Home | Next |
Syntax
Access_Specifier class class-Name { public static void main(String args[]) or (String []args) { } }
- The Acess_ Specifier may be public, private, protected or default. It depends type of class.
- Class is a keyword which is used to create a class.
- Class _Name is userdefined type which is not include in class name keywords or reserve words.
class Hello { public static void main(String args[]) { System.out.print("Hello Delhi"); } }
output :
Hello Delhi
Previous | Home | Next |