Changes between Version 2 and Version 3 of ControlSystems/SoftwareTeam/Training/GettingStarted/HelloWorld


Ignore:
Timestamp:
Nov 4, 2019, 2:33:48 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/HelloWorld

    v2 v3  
    55In VSCode:
    661. Select File->Open Folder and choose the !JavaProjects\Hello World folder you just created.
    7 2. Select File->New  which will open the editor for you to enter a new program
    8 3. Cut and paste the following program into the editor:
     71. Select File->New  which will open the editor for you to enter a new program
     81. Cut and paste the following program into the editor:
    99{{{
    1010public class Hello {
     
    1414}
    1515}}}
    16 4. Select File->Save and name the file Hello.java  the name is important; it must be Hello.java with a capital H (case matters to Java).  The name of the file must be the same as the name of the class (more on classes later)
    17 5. In the left navigation window, you'll now see Hello.java with a red J icon next to it; right click on the Hello.java and select Run
    18 6. A terminal window will open, the program will be compiled and then run; you'll see the output: Hello world!
     161. Select File->Save and name the file Hello.java  the name is important; it must be Hello.java with a capital H (case matters to Java).  The name of the file must be the same as the name of the class (more on classes later)
     17
     18=== Run the program
     19There are multiple ways to run your program [[Image(JavaHello.jpg,align=right,50%,margin=10)]]
     20   * In the editor, just below the first line, you'll see an option to click "Run"
     21   * In the left navigation window, you can see the program file (Hellow.java) with a red J next to it indicating that it is a Java file; right click on Hello.java and select Run.
     22
     23When you run the program, a terminal window will open, the program will be compiled and then run; [[BR]]
     24In the terminal window below, you'll see the output:
     25   {{{ Hello world! }}}
     26Congratulations, you just wrote your first Java program!!!
     27
     28=== Extra Credit ===
     29Change the text that's printed to say something different from ''Hello World''.  Whatever you want printed must be between the double quotation marks.