User Tools

Site Tools


hello_world_without_an_ide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
hello_world_without_an_ide [2022/08/03 13:31] – [Linux / MacOS] frchrishello_world_without_an_ide [2022/08/03 13:34] – [1. Type the code as a text file] frchris
Line 2: Line 2:
 They say the only way to teach a fish about water is to remove the fish from the water.  So in the time honored tradition of writing "Hello World!" (whenever you learn a new computer language), lets try. They say the only way to teach a fish about water is to remove the fish from the water.  So in the time honored tradition of writing "Hello World!" (whenever you learn a new computer language), lets try.
 We need to type the following Java code as a text file.   Java requires that the File name is Capitalized, and ends in ''.java'' We need to type the following Java code as a text file.   Java requires that the File name is Capitalized, and ends in ''.java''
-<code java> + 
-public class First  +=== 1Type the code as a text file === 
-+
- public static void main(String[] args)  +
-+
- System.out.println("Hello World!"); +
- +
-+
-</code>+
  
 ==== Linux / MacOS ==== ==== Linux / MacOS ====
Line 23: Line 17:
 ==== Windows 7-64 bit and later ==== ==== Windows 7-64 bit and later ====
 ''notepad First.java'' ''notepad First.java''
 +
 +Now in respect editors we type:
 +<code java>
 +public class First 
 +{
 + public static void main(String[] args) 
 + {
 + System.out.println("Hello World!");
 + }
 +}
 +</code>
 +===== 2. Compile the Code =====
 +
 +===== 3. Execute the Code =====
 +
  
hello_world_without_an_ide.txt · Last modified: 2022/08/03 13:53 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki