The basic rules of java-06-java program

The simplest Java program

class Test{
    
    
}

When java Test will report an error when the
java command is explained, there must be

public static void main(String[] args){
    
    
        }

main method, and must be in this format

Java source file naming
must be .java suffix The
source file name can be arbitrary, but if the source file has a public class, the name must be the same as the class name.
This also limits a source file to only one public class

All keywords in
Java are lowercase, and Java is strictly case sensitive

Guess you like

Origin blog.csdn.net/puyu2017/article/details/106304952
Recommended