From e731aea6b1412a3fd9a46db0b02602b5ffbfb86b Mon Sep 17 00:00:00 2001 From: 0verkil <112268976+0verkil@users.noreply.github.com> Date: Wed, 22 Jul 2026 21:09:32 -0700 Subject: [PATCH 1/6] stage 0 cleanup --- examples/stage0/snippets/Operators.java | 9 +++++--- .../stage0/java-fundamentals.mdx | 14 ++++++------ .../docs/learning-course/stage0/operators.mdx | 22 +++++++++---------- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/examples/stage0/snippets/Operators.java b/examples/stage0/snippets/Operators.java index e7b8b934..8564d1b1 100644 --- a/examples/stage0/snippets/Operators.java +++ b/examples/stage0/snippets/Operators.java @@ -19,8 +19,11 @@ void main() { int x = 6; int y = 7; - System.out.println(x++); - System.out.println(y--); + x++; // x is now 7! + y--; // y is now 6! + + System.out.println(x); // prints 7 + System.out.println(y); // prints 6 // [/increments] // [arithmetic] @@ -36,7 +39,7 @@ void main() { // [comparison] int c = 2; int d = 4; - System.out.print(c > d); + System.out.print(c > d); // prints False // [/comparison] // [logical] diff --git a/src/content/docs/learning-course/stage0/java-fundamentals.mdx b/src/content/docs/learning-course/stage0/java-fundamentals.mdx index 601e7fcc..3cba1b53 100644 --- a/src/content/docs/learning-course/stage0/java-fundamentals.mdx +++ b/src/content/docs/learning-course/stage0/java-fundamentals.mdx @@ -47,21 +47,21 @@ Data types can include numbers, characters, or a string of words. Some example data types that are commonly used in FRC programming are: - int: integer numbers that are positive or negative. - Int only allows numbers without decimals. + int only allows numbers without decimals. Example: 12 - double: numbers that are positive or negative. Unlike int, double allows numbers with or without decimals. Example: 34.1 - boolean: either True or False. -- string: holds a sequence of characters. +- String: holds a sequence of characters. Denoted by double quotes ("). Example: “Hello World” -- char: holds a Single character. +- char: holds a Single character. Denoted by single quotes ('). Example: 'A' -The name of your variable can be whatever you want, but it should be easy to read and make sense to others who may be reading your code. -Some rules for variables include not using spaces, instead you writing variables with camel case (frontLeftDrive). -Upper snake case (FRONT_LEFT_DRIVE) can be used for constants, which we will learn about later in the course. -It should also be noted that variable names can have numbers at any point except for the first character. +The name of your variable can be almost anything you want, but it should be easy to read and make sense to others who may be reading your code. +One major exception is spaces, which are forbidden in variable names. Instead, you should write variables in what's known as camel case (frontLeftDrive). +Upper snake case (FRONT_LEFT_DRIVE) should be used instead for constants, which we will learn about later in the course. +Variable names can have numbers at any point except for the first character. (motor2 is legal, 2motor is not).