Signature of main() method:
public static void main(String[] args)
{
// code comes here
}
Public: It is an Access modifier, which specifies from where and who can access the method
Static: by making class as static,JVM initialize main method with out creating any object for that
Main: The point from where the program starts its execution
Void: It is a keyword and used to specify that a method doesn’t return anything
String[] args: It stores Java command line arguments and is an array of type java.lang.String class
Java Concepts • Added 10 months ago
* In Java, string objects are immutable in nature which simply means once the String object is created its state cannot be modified. * Whenever you ...
In Java, super() and this(), both are special keywords that are used to call the constructor. __this:__ 1. this() represents the current instan ...
* __Equals()__ method is defined in Object class in Java and used for checking equality of two objects defined by business logic. * __''==''__ or dou ...
__final__ is a special keyword in Java that is used as a non-access modifier. A final variable can be used in different contexts such as final variabl ...
__Local Variable:__ a local variable is typically used inside a method, constructor, or a block and has only local scope. Thus, this variable can be ...