003_ first JAVA program notes

summary:

1, and tell you how to develop a JAVA program
Here Insert Picture Description

  • The first step : the first to write our code, tools that notepad ++ (code: designated ANSI encoding, language: select JAVA)

  • Step two : we want to use our JDK installed (in the bin directory: javac.exe) compile, compiled by the formation of the end of the .class suffix of a file with the same name

  • The third step : we execute our JDK installed (in the bin directory: java.exe), were running our first HelloWorld applet

    the HelloWorld class {public
    public static void main (String [] args) {
    System.out.println ( "Java, Hello!");
    }
    }
    compiler: javac HelloWorld.java
    explained: java HelloWorld

2, when we write a small program to pay attention to some problems:

  1. We must pay attention to the spelling of the word, for example, the main method (this is wrong: mian)
  2. Note that writing code, pay attention to the brackets are paired children appear
  3. Do not write any Chinese symbols in the code
  4. There is a problem it does not matter, we must learn to view the error (small partners to find the problem in accordance with the line number prompt, read to your error message)

Guess you like

Origin blog.csdn.net/weixin_41887201/article/details/91504806