new is used for memory allocation in java which on later automatically deallocated by garbage collector.
The getContentPane() method is used to get the main component in a Java Swing JFrame. It is usually a JPanel.
In java need main() method. without main() in java we won't run the java programe main() signals the entry point to the program - it tells the Java Virtual Machine which is the first program that should be executed.
In the case of the Java language, it is necessary. The reason is because that's how creating objects was defined in Java. Note that a method can return an object, so the use of the "new" operator may be hidden: x = SomeClass.someMethod(); In this example, is someMethod() returns an object, x will point to this object; however, the "new" operator is still used in the method someMethod().
Java does not support user defined operator overloading.The operator '+' is overloaded in Java and can be used for adding both numbers and Strings.
Void is a keyword in Java. It is always used in method declarations. When used in the line that declares a method, it signifies the fact that the method will not return any value. The JVM will not expect the method to return anything. Ex: public static void main(String[] args) {}
Java does not support object overriding. It does support operator overloading by means of the "+" symbol which is used for both numeric addition as well as string concatenation.
The Main method is the method in which execution to any java program begins. A main method declaration looks as follows: public static void main(String args[]){ } The method is public because it be accessible to the JVM to begin execution of the program. It is Static because it be available for execution without an object instance. you may know that you need an object instance to invoke any method. So you cannot begin execution of a class without its object if the main method was not static. It returns only a void because, once the main method execution is over, the program terminates. So there can be no data that can be returned by the Main method The last parameter is String args[]. This is used to signify that the user may opt to enter parameters to the java program at command line. We can use both String[] args or String args[]. The Java compiler would accept both forms.
void to indicate the application is not returning the exit code to the outer calling process. The outer calling process is another program (not necessary written in java), the human invoke the program on OS level, a batch job/script, etc. It works just like any method in java. main() itself is a method.
native is a key word used in java method. there is no variable as native in java
The Java API is the API for the main Java Library.
String class in Java has an 'equals' method that can be used to compare strings.
Because main is the first method being executed, the Java Virtual Machine cannot expect any return values from this method. Since void is the term used to refer to a variable that does not return any value, we use the key word void for the method signature of the main method