The first stage 04 Java basic syntax

When writing Java programs, keep the following points in mind

  case-sensitive : Java is case-sensitive, which means that the identifier Hello is different from hello

  Class names : For all classes, the first letter of the class name should be capitalized. If the class name consists of several words, the first letter of each word should be capitalized, for example: HelloWorld

  Method names : All method names should start with a lowercase letter. If the method name contains several words, capitalize the first letter of each subsequent word, for example: helloWorld

  Source file name : The source file name must be the same as the class name. When saving the file, you should use the class name as the filename (remember that Java is case sensitive), and the filename extension should be .java. (If the filename and classname are not the same it will cause a compile error)

  Main method entry : All java programs are executed by the public static void main (String[] args) method

 

Java identifiers

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324496810&siteId=291194637