Big Ideas

Key notes from AP CSA Unit 1.1–1.20 (curated & includes all provided summaries)

Unit 1 & 2 — Video Explanation

If the video doesn’t load, use the “Open in Google Drive” button.

1.1 – Why Programming?

1.2 – Introduction to Java

1.3 – Printing in Java & Literals

1.4 – Comments

1.5 – Variables & Data Types

1.6 – Operators, Expressions & Casting

1.7 – User Input with Scanner

1.8 – The Math Class (Basics)

1.9 – Errors & Debugging

1.1.10 Summary

public class MyClass {
  public static void main(String[] args) {
    System.out.println("Hi there!");
  }
}

1.2.7 Summary

int score; double gpa = 3.5;

1.3.6 Summary

1.5.6 Summary

1.7.4 Summary

1.8.6 Summary

1.9 Summary

1.10.5 Summary

1.11.4 Summary

1.12.8 Summary

1.13.7 Summary

1.14.7 Summary

1.15.9 Summary

1.16 – Unit Summary 1a (1.1–1.6)

In this unit you learned about the three primitive data types on the exam: int, double, and boolean. You also learned how to declare (name) and change the value of variables. You learned about operators, casting, and integer constants for the min and max integer values.

1.16.1 Concept Summary

1.16.2 Java Keyword Summary

1.20 – Unit Summary 1b (1.7–1.15)

In this unit, you learned to use objects (variables of a class type) that have been written for you in Java. You learned to use constructors and methods with and without parameters of objects, and built-in Java classes like String, Integer, Double, and Math.

1.20.1 Concept Summary

1.20.2 Java Keyword Summary

Class Notes — Java & String Hızlı Rehber (alt alta satırlar)

Sık kullanılan satırlar (I/O, Math, değişkenler) ve String metodları — tek tek satırlar halinde.

Java Satırları

System.out.println("Hello");
System.out.print("No newline");
import java.util.Scanner;
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
double x = scanner.nextDouble();
String w = scanner.next();           // boşluğa kadar
String line = scanner.nextLine();    // tüm satırı alır
final double PI = Math.PI;
double s = Math.sqrt(16);
double p = Math.pow(2, 5);
int mx = Math.max(aa, bb);
int mn = Math.min(aa, bb);
double r = Math.random();

String Metodları

String word = "mind";
int n = word.length();
char c = word.charAt(2);                 // 'n'
String first = word.substring(0, 1);
String mid = word.substring(1, 3);       // "in"
int pos = word.indexOf("in");            // 1 (yoksa -1)
boolean has = word.contains("in");       // true
String rep = "m y".replace(" ", "\n");
boolean eq = "hello".equals("hello");    // true
int cmp = "hello".compareTo("jello");    // negatif
String up = "hi".toUpperCase();
String low = "OK".toLowerCase();

Karakter Karakter Döngü

for (int i = 0; i < word.length(); i++) {
  char ch = word.charAt(i);
  // işlem...
}

Unit 2 — Selection & Repetition

Short, full-English summary of 2.1–2.6

2.1 Algorithms with Selection and Repetition

2.2 Boolean Expressions

2.3 if Statements

if (condition) {
  // code
} else if (condition) {
  // code
} else {
  // code
}

2.4 Nested if Statements

// Example: school lunch price
if (isStudent) {
  if (hasID) {
    price = 5.0;
  } else {
    price = 6.5;
  }
} else {
  price = 8.0;
}

2.5 Compound Boolean Expressions

// Safe check with short-circuit
if (i >= 0 && i < arr.length && arr[i] != null) {
  use(arr[i]);
}

2.6 Comparing Boolean Expressions

// Equivalent but clearer rewrite
// Original:
if (!(age < 13 || age > 18)) teen = true;
// Better:
if (age >= 13 && age <= 18) teen = true;

Unit 2 — Loops & Algorithms (2.7–2.9)

2.7 — while Loops

2.8 — for Loops

2.9 — Implementing Selection & Iteration Algorithms

Runestone Notes — Unit 2 (2.1–2.13, 2.20)

2.1.5 Summary

2.2.5 Summary

2.3.6 Summary

2.4.4 Summary

2.5.5 Summary

2.6.9 Summary

2.7.6 Summary

// Runs zero or more times
int count = 0; // initialize
while (count < 10) { // test
    // body
    count++;        // update
}

2.8.4 Summary

2.9.9 Summary

2.10.4 Summary

2.11.3 Summary

2.12.4 Summary

2.12.5 Loop Analysis Game

2.13 — Unit 2 Part 1: Selection (2.1–2.6)

Conditionals execute code when a Boolean expression is true or false (e.g., x > 0).

2.13.1 Concept Summary

2.13.2 Java Keyword Summary

2.20 — Unit 2 Part 2: Loops (2.7–2.12)

Loops repeat a statement or block inside { }.

2.20.1 Concept Summary

2.20.2 Java Keyword Summary

Unit 3 — Cortado (3.1–3.5)

High-level design & OOP structure: abstraction, impact of design, anatomy of a class, constructors, and how to write methods.

3.1 — Abstraction and Program Design

3.2 — Impact of Program Design

3.3 — Anatomy of a Class

public class Player {
  // 1) Fields (instance variables)
  private String name;
  private int score;

  // 2) Constructors
  public Player(String name, int score) {
    this.name = name;
    this.score = score;
  }

  // 3) Methods (behaviors)
  public void addPoints(int points) {
    score += points;
  }

  public int getScore() {
    return score;
  }
}

3.4 — Constructors

public class Point {
  private int x;
  private int y;

  // No-arg constructor
  public Point() {
    this(0, 0); // calls the other constructor
  }

  // Full constructor
  public Point(int x, int y) {
    this.x = x;
    this.y = y;
  }
}

3.5 — Methods: How to Write Them

public int add(int a, int b) {
  int sum = a + b;     // local variable
  return sum;          // return value
}