I believe that many people when learning Java always find the main function is used like this:
public static void main (String args[])
so why is that?
main () “method type” is void, indicating that the method does not return a value. It has a parameter, “GRAS,” which is an array of objects of type String. The method declaration for main() is fixed and cannot be changed. The access modifier for the
main () method is public, so you can run the program (call the method) from anywhere.
Read More:
- The principle and return value of get() function in C language
- Explicit and implicit conversion of Java data type
- How to convert a Java string into a number (stringtonumber)
- Abstract method and static method of java interface
- Java error prompt….. cannot be resolved
- Ternary operator in Java?: error: not a statement
- How to Close the Current Form in JAVA Swing
- Xdoc generates API documents based on Java annotations
- JAVE: LeetCode(189) Rotate Array
- JAVA 8: How to Convert List to Map
- Java — for loop printing graphics (loop structure)
- JAVA: Random access file is always garbled
- Extracting JDBC tool class: JDBC utils
- The number of control threads and concurrency number of concurrent executor of Java starting gun
- Comparison between ArrayList and HashMap
- Mybatis single parameter pass in exception (How to Fix)
- Jtextfield cannot be displayed normally when added to JPanel
- Multipartfiletofileutils (multipartfile to file)
- Conversion of two data types in Java
- Customize the jump address after Shiro logout