Java - Basic Program & Understanding
class Welcome{
public static void main(String args[]){
System.out.println("Welcome to Java");
}
}
- class Used to declare a class in java.
- public Access modifier which represents visibility
- static It is a keyword. No need to create a object for this method. JVM will call this.
- void It doesn't return any value.
- main starting point of the program.
- String[] args Input argument
- System.out.println() is used to print statement. Here, System is a class, out is the PrintStream class object, println() is the PrintStream class method.
Comments
Post a Comment