Please enable JavaScript to use CodeHS

AP Computer Science A (Mocha - 2019 AP CSA Framework)

Basic Java

In this module, students learn the basics of the Java programming language. This module covers printing, variables, types, as well as how to use the basic control structures in the Java language.

Lessons

2.1 Printing in Java

  • Printing in Java
  • Printing in Java
  • Hello world
  • Printing Multiple Lines
  • Welcome Program
  • +1 more

2.2 Variables and Types

  • Variables and Types
  • Variables and Types
  • Variables
  • Our First Integer
  • Answering Questions

2.3 User Input

  • User Input
  • User Input
  • UserInput
  • About You
  • Poetry
  • +1 more

2.4 Arithmetic Expressions

  • Arithmetic Expressions
  • Arithmetic Expressions
  • Calculator
  • Tricky Java
  • Weight of a Pyramid
  • +1 more

2.5 Casting

  • Casting
  • Casting
  • Casting
  • Casting to an Int
  • Casting to a Double
  • +3 more

2.6 Booleans

  • Booleans
  • Booleans
  • Boolean Example
  • Ice Cream
  • Booleans Badge

2.7 Logical Operators

  • Logical Operators
  • Logical Operators
  • Light Switch
  • Roller Coaster

2.8 Comparison Operators

  • Comparison Operators
  • Comparison Operators
  • Grade Range
  • Triple Double

2.9 For Loops

  • For Loops
  • For Loops
  • The For Loop
  • Repeat 1000 Times
  • General For Loop
  • +6 more

2.10 While Loops

  • While Loops
  • While Loops
  • While Loop Countdown
  • Making Taffy

2.11 If Statements

  • If Statements
  • If Statements
  • Negative Numbers
  • Even and Odd
  • Find the Minimum

2.12 Loop-and-a-Half

  • Loop-and-a-Half
  • Loop-and-a-Half Quiz
  • Running Average
  • Guess the Number
  • Looper Badge

2.13 Short-Circuit Evaluation

  • Short-Circuit Evaluation
  • Short-Circuit Evaluation Quiz
  • Pizza Slices
  • Divisibility

2.14 De Morgan's Laws

  • De Morgan's Laws
  • De Morgan's Laws Quiz
  • De Morgan AND
  • De Morgan OR
  • Amusement Park

2.15 Strings

  • Strings
  • Strings
  • Comparing Strings
  • Three Strings
  • Basic Java Exercises Badge

2.16 Basic Java Quiz

  • Basic Java Quiz