↧ App ❑ Windows ⌘ Mac
LIVE CODE
ROOM: ----
Waiting for the instructor to open the room...
Checking every 10 seconds.
LIVE CODE
Java Classroom -- Real-time Collaboration
Join as
>_ LIVE CODE
ROOM: ----
INSTRUCTOR
INSTRUCTOR
⚊ OFFLINE
-- waiting for instructor --
INSTRUCTOR OUTPUT
📄 PROBLEM ⌄
OUTPUT
JAVA REFERENCE

Named containers that store a value. The type (int, double, boolean, String) tells Java what kind of data to expect.

int x = 5; double d = 3.14; boolean flag = true; String s = "hello";

Prints text or values to the console. Use println to add a newline after, print to stay on the same line.

System.out.println("text"); System.out.print("no newline"); System.out.println("val: " + x);

Runs different code based on a condition. Use else if to check additional conditions, else to catch everything that didn't match.

if (x > 0) { // ... } else if (x == 0) { // ... } else { // ... }

Repeat a block of code. Use for when you know the count, while when you have a condition, for-each to iterate a collection.

// for for (int i = 0; i < 10; i++) { } // while while (condition) { } // for-each for (String item : list) { }

A fixed-size, ordered list of values all of the same type. Good when you know the size upfront and need fast index access.

int[] nums = {1, 2, 3}; nums[0] // access nums.length // size

A resizable list from the Java standard library. Use it when the number of items can grow or shrink at runtime.

import java.util.ArrayList; ArrayList<String> list = new ArrayList<>(); list.add("item"); list.get(0); list.size();

Built-in actions you can call on any String to inspect or transform its text. Always use equals() to compare strings, not ==.

s.length() s.toUpperCase() s.substring(0, 3) s.indexOf(",") s.equals("other")

A class is a blueprint for objects. The constructor runs when you create a new instance and sets up its initial state.

public class Dog { private String name; public Dog(String name) { this.name = name; } public String getName() { return name; } }

Lets a child class reuse and extend a parent class. Use super() to call the parent constructor, @Override to replace a parent method.

public class Dog extends Animal { public Dog(String name) { super(name); // call parent } @Override public String sound() { return "Woof!"; } }

A contract that any implementing class must fulfill. Use interfaces to define shared behavior across unrelated classes.

interface Printable { void print(); } class Doc implements Printable { public void print() { ... } }

A partial blueprint. Abstract methods have no body and must be implemented by subclasses. Use when subclasses share some code but differ on specifics.

abstract class Shape { public abstract double area(); } class Circle extends Shape { public double area() { return Math.PI * r * r; } }

Reads input typed by the user at the console. Always close the Scanner when done to release the underlying stream.

import java.util.Scanner; Scanner sc = new Scanner(System.in); String line = sc.nextLine(); int n = sc.nextInt(); sc.close();

Handles errors that might occur at runtime without crashing the program. The catch block runs only if the try block throws an exception.

try { // risky code } catch (Exception e) { System.out.println(e.getMessage()); }
OUTPUT
STUDENT DASHBOARD READY: 0 / 0
No students connected
Problem Library
Student View
-- ✓ READY
Accessibility Options
Dyslexia-Friendly Font
Switches all text to OpenDyslexic, including code editors (uses OpenDyslexic Mono).
Dark Mode
Reduces screen brightness. Light mode is always the default.
Rainbow Brackets
Colors matched bracket pairs by nesting depth. Depth shown on hover.
Share to All Students
Cursor & Selection Highlight
Shows your cursor position and text selections on students' read-only panel.
Click Circle
Shows a brief circle where you click in your editor.
Line Number Highlight
Highlights the active line number in the gutter on students' panel.
Share to Viewed Student
Highlights & Clicks on Student Editor
When viewing a student, share your selections and clicks onto their own editor.
Confirm
Prompt
New File