Two lesson slide decks: Lesson 1 VS Code and Java, Lesson 2 Git and GitHub

1 / 8
VS CodeJava

Writing your first Java program in VS Code

A relaxed 25-minute intro — no pressure, just fun. You'll run real Java code by the end!

IT Applications Development · Lesson 1
2 / 8 Agenda

What we'll do today

1
Tour VS Code
5 min
2
Java basics
7 min
3
Write + run code
8 min
4
Personalise it
5 min
3 / 8 VS Code

Getting to know VS Code

VS Code is a free, lightweight code editor — it's what most developers use daily

  • Explorer — your files and folders on the left
  • Editor — where you write code in the middle
  • Terminal — run your program here (Ctrl + `)
  • Extensions — add Java support and more
useful shortcuts
Ctrl + `   open terminal
Ctrl + S   save file
Ctrl + Z   undo
Ctrl + /   comment line
Install: Extension Pack for Java
Search for it in the Extensions panel — gives you Java syntax highlighting and run buttons
4 / 8 Java

Java basics — what you need to know

  • Every Java program lives inside a class
  • Code runs from the main method — always
  • System.out.println() prints text to screen
  • Every statement ends with a semicolon ;
public class MyApp {
 public static void main
   (String[] args) {
  // your code here
 }
}
File name must match class name exactly
If your class is called MyApp, save the file as MyApp.java — Java is strict about this!
5 / 8 Java

Your first program — Hello World

Every programmer starts here. Type this out (don't copy-paste!)

// HelloWorld.java
public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}
To run it
Click the play button at the top right, or type javac HelloWorld.java then java HelloWorld in the terminal
Expected output
Hello, World!
6 / 8 Java

Variables — storing information

Variables let you save values and use them later

public class HelloWorld {
  public static void main(String[] args) {
    String name = "Sarah";
    int age = 17;
    System.out.println("Hi, I am " + name);
    System.out.println("I am " + age + " years old");
  }
}
String
Text — always in double quotes
int
Whole numbers — no quotes needed
7 / 8 Your turn

Mini challenge — personalise it!

Update the program to greet you by name and say something about yourself

public class AboutMe {
  public static void main(String[] args) {
    String name = "___"; // your name
    String hobby = "___"; // your hobby
    System.out.println("Hi! My name is " + name);
    System.out.println("I love " + hobby);
  }
}
Bonus: add a third line about yourself!
Try adding another variable — maybe your favourite food, school, or dream job
8 / 8 Wrap up

Great work today!

  • Set up and navigated VS Code
  • Understood Java program structure
  • Wrote and ran a real Java program
  • Used variables to store data
Next lesson preview
  • What is Git and why developers use it
  • Push your Java code to GitHub
  • Build your developer profile!
Practice before next lesson
Try adding an if/else statement to your program — ask your tutor if you get stuck!
1 / 8
GitGitHubJava

Saving your code like a pro with Git & GitHub

By the end you'll have your Java code live on GitHub — your first developer portfolio piece!

IT Applications Development · Lesson 2
2 / 8 Agenda

What we'll do today

1
What is Git?
5 min
2
Key commands
5 min
3
GitHub setup
5 min
4
Push Java code
10 min
3 / 8 Git

What is Git?

Think of Git as a save history for your code — like Ctrl+Z but forever

Without Git
  • HelloWorld.java
  • HelloWorld_v2.java
  • HelloWorld_FINAL.java
  • Sound familiar? 😅
With Git
  • One file, full history
  • Every change is tracked
  • Undo mistakes any time
  • Safe to experiment!
4 / 8 Git

The 4 commands you need

git init
Start tracking a folder with Git — do this once when you create a new project
git add .
Tell Git which files you want to save — the dot means "everything in this folder"
git commit -m "your message"
Take a snapshot of your code with a short description of what you changed
git push
Upload your saved snapshots to GitHub so it's backed up online
5 / 8 GitHub

Setting up GitHub

# Connect your project to GitHub (do once)
git remote add origin https://github.com/username/my-project.git
git branch -M main
git push -u origin main
After the first time, just use: git push
Git remembers where to send your code — no long command needed again
6 / 8 Java + Git

Let's commit our Java code

Open the AboutMe.java file from last lesson in VS Code terminal

# Step by step in the VS Code terminal
git init
git add AboutMe.java
git commit -m "Add AboutMe program"
git push
Commit message tips
Write what you changed, not "update" or "fix". E.g. "Add greeting feature"
Check your work
Run git log to see your commit history
7 / 8 Your turn

Mini challenge — update and push again

Add user input to your program, then make a second commit

import java.util.Scanner;

public class AboutMe {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    System.out.print("What is your name? ");
    String name = sc.nextLine();
    System.out.println("Hello, " + name + "!");
  }
}
git add .   git commit -m "Add user input"   git push
8 / 8 Wrap up

You're thinking like a developer now!

  • Understood what Git is and why it matters
  • Created a GitHub account and repo
  • Made multiple commits with good messages
  • Added user input to a Java program
Explore on your own
  • git log — see all your commits
  • git branch — work on new features safely
  • Add a README.md to describe your project
Habit to build: commit every time you finish something
Even small changes — future you will be very grateful for the history!