







































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








































Source code: HelloWorld.java
Byte code: HelloWorld.class
Hello World
Compile (javac) Run (java)
This class/program is accessible from outside (the file)
We are going to define a class / program
The class/program is to be called Test
This set of instructions is accessible from outside (the class) and can be used immediately
The set of instructions is to be called main
Print Hello World to the screen
How we find the extra data typed in after the name of the program
Once it is done, no data is sent back for more processing
public class Test {
public static void main ( String[] args ) { System.out.println (“Hello World”); } }
Instruction instruction instruction ...
classY
Instructiona instructionb instructionc ...
classX
Instruction instruction instruction ...
object
Instruction instruction instruction ...
object
Instructiona instructionb instructionc ...
object
(^) STUFF vs stuff vs STuff vs stUFF
(^12345)
(^) JanetandJustin
(^) lots_of_money
(^) “Hello world”
(^) J
(^) cc:
(^) System.out.println (12); (^12) (^) System.out.println (“No:” + 12); (^) No: (^) System.out.println (12 + 13); (^25) (^) System.out.println (“No:” + (12 + 13)); (^) No:
(^) (10 / 4.0f) * 4
(^) Must use suffix to force calculations to be floating point!