From d1691be9f57b71b7373d124815de79e0b3c075f7 Mon Sep 17 00:00:00 2001 From: Adriana Massie Date: Thu, 7 May 2026 20:50:15 -0400 Subject: [PATCH 1/3] It works works but has pages that aren't needed...but it works --- src/config/sidebarConfig.ts | 14 +++++ src/content/docs/index.mdx | 18 ++++--- .../docs/intro-to-java/stage-overview.mdx | 21 ++++++++ src/content/docs/intro-to-java/variables.mdx | 51 +++++++++++++++++++ 4 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 src/content/docs/intro-to-java/stage-overview.mdx create mode 100644 src/content/docs/intro-to-java/variables.mdx diff --git a/src/config/sidebarConfig.ts b/src/config/sidebarConfig.ts index 9642d0b..857725b 100644 --- a/src/config/sidebarConfig.ts +++ b/src/config/sidebarConfig.ts @@ -65,6 +65,20 @@ export const sidebarSections: Record = { }, ], + // Intro To Java section + '/intro-to-java': [ + { + label: 'Intro to Java', + items: [ + { label: 'Stage Overview', slug: 'intro-to-java/stage-overview' }, + { label: 'Variables', slug: 'intro-to-java/variables' }, + { label: 'Conditionals and Loops', slug: 'intro-to-java/conditionals-and-loops' }, + { label: 'Methods', slug: 'intro-to-java/methods' }, + { label: 'Objects', slug: 'intro-to-java/objects' }, + ], + }, + ], + // Resources section (content lives at /resources but navbar says "Other Resources") // '/resources': [ // { diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 97f97a0..775c380 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -17,6 +17,18 @@ hero: import HomeCard from '../../components/HomeCard.astro';
+ + -
diff --git a/src/content/docs/intro-to-java/stage-overview.mdx b/src/content/docs/intro-to-java/stage-overview.mdx new file mode 100644 index 0000000..6f65958 --- /dev/null +++ b/src/content/docs/intro-to-java/stage-overview.mdx @@ -0,0 +1,21 @@ +--- +title: Stage Overview +description: An Intro to what Java is and the topics that will be covered in this stage +prev: false +next: intro-to-java/variables +--- + +Learning the basics of Java is the most important step in learning FRC programming because it builds the foundation. In Java, objects are used to create motor +controllers that allow a robot to run a motor, variables are used to assign a speed to the motor, and much more. There is a lot to learn when learning Java. However, +FRCSoftware will go over the basics needed to program a robot. + +Each section will have different activities and exercises to help build up a good understanding of the basics of Java. Therefore if you’re new to programming, it is highly +recommended to go through each step in order. This will help ensure that you don’t miss any important information. + +This stage will cover the following topics +* Print statements and Variables +* Conditionals and Loops +* Methods +* Objects + + diff --git a/src/content/docs/intro-to-java/variables.mdx b/src/content/docs/intro-to-java/variables.mdx new file mode 100644 index 0000000..35028b0 --- /dev/null +++ b/src/content/docs/intro-to-java/variables.mdx @@ -0,0 +1,51 @@ +--- +title: Variables +description: An Intro to print statements and variables +prev: intro-to-java/variables +next: false +--- + +import Aside from '../../../components/Aside.astro'; + + + +## Comments +When programming, we use comments to write notes that explain what the code does. This helps make the code more readable for others because if they are unsure of what your code does, they can read your comments. Comments are not run by the compiler, which also means that you can use comments to prevent code from running. +In Java, there are two types of comments. Single-line Comments and Multi-line Comments. + +### Single-line Comments +Single-line comments are // and you add them to the front of your text or line of code. For example, the code below leaves a note of “this prints out Hello World. +```java +// This prints Hello World +System.out.print("Hello World"); +``` +You will also see comments placed at the end of code like the following +```java +System.out.print("Hello World"); // This prints Hello World +``` +Both examples accomplish the same tasks and there is no difference. If you put your comments above or next to code is up to you and what makes the most sense for your code. + +### Multi-line Comments +Multi-line Comments start with /* and end with */ The text or code that is in between the two will turn into comments. Multi-line Comments are commonly used when you have many lines of text or need to turn a large amount of code into a comment. +For example, this is a comment with two lines of text +```java +/* This prints Hello World +This is another line */ +System.out.print("Hello World"); +``` + + + + +## Print statements + +## Variables + +Before we learn about variables, we’ll learn about print statements. When programming, it can be useful to print information to a terminal. This can be helpful for making programs that display information to the user or printing out what the motor speed is. In Java, we can print information using a print statement. + + +## Variables From 317c98293cb38944e423bd813a165da2f8bda2fd Mon Sep 17 00:00:00 2001 From: Adriana Massie Date: Thu, 7 May 2026 22:40:18 -0400 Subject: [PATCH 2/3] page name updated --- src/config/sidebarConfig.ts | 5 +---- .../{variables.mdx => java-fundamentals.mdx} | 10 +++------- src/content/docs/intro-to-java/stage-overview.mdx | 8 +++----- 3 files changed, 7 insertions(+), 16 deletions(-) rename src/content/docs/intro-to-java/{variables.mdx => java-fundamentals.mdx} (85%) diff --git a/src/config/sidebarConfig.ts b/src/config/sidebarConfig.ts index 857725b..1693433 100644 --- a/src/config/sidebarConfig.ts +++ b/src/config/sidebarConfig.ts @@ -71,10 +71,7 @@ export const sidebarSections: Record = { label: 'Intro to Java', items: [ { label: 'Stage Overview', slug: 'intro-to-java/stage-overview' }, - { label: 'Variables', slug: 'intro-to-java/variables' }, - { label: 'Conditionals and Loops', slug: 'intro-to-java/conditionals-and-loops' }, - { label: 'Methods', slug: 'intro-to-java/methods' }, - { label: 'Objects', slug: 'intro-to-java/objects' }, + { label: 'Java fundamentals', slug: 'intro-to-java/java-fundamentals' }, ], }, ], diff --git a/src/content/docs/intro-to-java/variables.mdx b/src/content/docs/intro-to-java/java-fundamentals.mdx similarity index 85% rename from src/content/docs/intro-to-java/variables.mdx rename to src/content/docs/intro-to-java/java-fundamentals.mdx index 35028b0..c6f801c 100644 --- a/src/content/docs/intro-to-java/variables.mdx +++ b/src/content/docs/intro-to-java/java-fundamentals.mdx @@ -1,10 +1,9 @@ --- -title: Variables +title: Java Basics description: An Intro to print statements and variables -prev: intro-to-java/variables +prev: intro-to-java/java-fundamentals next: false --- - import Aside from '../../../components/Aside.astro';