Skip to content

Activity 1: Intro to Java

Instructions

Example Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
package demo;

/**
 * The traditional first program.
 *
 * @author Dee A. B. Weikle
 * @version 01/10/2024
 */
public class HelloWorldWelcome {

    /**
     * Output hello world on the screen.
     *
     * @param args command-line arguments
     */
    public static void main(String[] args) {
        System.out.println("Hello, World!");
        String message = "Welcome to CS159";
        System.out.println(message + " Everyone!");
    }

}