Create the learning folder
C:\JavaBasicsCourse\Day01\learning
Learn → Predict → Type → Run → Break → Fix → Practice
Go from an empty folder to a working Java program that you can compile, run, change, and troubleshoot.
Day 1 is intentionally narrow.
if statementsmainEverything today is String, int, println, and the + sign.
Before we learn Java, make sure your editor, terminal, compiler, and runtime are working together.
C:\JavaBasicsCourse\Day01\learning
Use File → Open Folder. The folder should appear in the Explorer pane.
Use Terminal → New Terminal. The prompt should point to the same folder.
Type this in the terminal.
java -versionType this next.
javac -versionThe course standard is Java 21; the patch number may differ.
openjdk version "21.0.x"
javac 21.0.xCreate the file in your learning folder. Type the code yourself.
public class SetupTest {
public static void main(String[] args) {
System.out.println("Setup works");
}
}
javac SetupTest.javajava SetupTestSetup works in the terminal and a new SetupTest.class file beside the source file.'javac' is not recognized — the compiler is not available on PATH.'java' is not recognized — check the terminal/environment.file not found — the terminal is probably in a different folder.You wrote source code, compiled it, and ran the result. Here is the mental model to keep.
SetupTest.javajavacSetupTest.classJVMSetup worksjavac builds. It turns .java source into .class bytecode.
java runs. It launches the class on the JVM.
JDK — the development kit you install.
JRE — the runtime environment and core libraries.
JVM — executes bytecode.
Start from a blank file. Type every character. Do not paste.
public class HelloJava {
public static void main(String[] args) {
System.out.println("Hello, Java!");
}
}
Save the file as HelloJava.java.
javac HelloJava.java
java HelloJavaHello, Java!Replace "Hello, Java!" with your own message. Compile and run again.
main method is where execution starts.Use the same repair loop every time: name the stage → read the first useful message → find the line → change one thing → save and try again.
System.out.println("Hello, Java!")
Compile. Look for:
'; ' expected
The compiler is pointing you toward a missing semicolon on this line or the line above.
Restore the semicolon, save, and compile again.
System to systemCompile and look for cannot find symbol.
Java is case-sensitive. Restore System.
Change the public class name without changing the filename. Compile and observe the name-mismatch message.
Make the public class name and file name match exactly, including capitalization.
Create ClaimStatusReport.java from a blank file.
String for the claim number.int for days open.Claim CLM-TRAIN-1042 has been open for 12 days.The next prototype sections are the guided WelcomeReport, the independent MemberWelcomeReport, and the afternoon MemberBenefitsSummary project.
Those pieces are already specified in your Day 1 materials; this prototype deliberately stops here so we can test the interaction model before expanding it.