//* W.A.P to print simple message
public static void main(String aa)
System.out.println(“welcome in java”);
Explanation of the program:
- class keyword is used to declare a class in java.
- public keyword is an access modifier which represents visibility, it means it is visible to all.
- static is a keyword, if we declare any method as static, it is known as static method. The core advantage of static method is that there is no need to create object to invoke the static method. The main method is executed by the JVM, so it doesn’t require to create object to invoke the main method. So it saves memory.
- void is the return type of the method, it means it doesn’t return any value.
- main represents startup of the program.
- String aa is used for command line argument. We will learn it later.
- System.out.println() is used print statement. We will learn about the internal working of System.out.println statement later.
Comments statement in Java
Comments statements in Java: Comment statement in Java Programming some time it is difficult to user ...read more
Features and Advantages of OOps
Feature of OOPs It makes the complete program simpler by dividing it into a number of ...read more
Where Java is used
Where Java is used? According to Sun, 3 billion devices run Java. There are many devices ...read more
Types of Java Applications
Types of Java Applications There are mainly 4 types of applications that can be created using ...read more
History of Java
History of Java Java is pure object oriented programming language. It is developed by James ...read more
Byte code and JVM
Byte code and JVM Java is a high level programming language. The program written in java ...read more