Please enable JavaScript to use CodeHS

Texas Computer Science 2

Basic Java

Students learn the basics of the Java programming language, including printing, variables, types, and basic control structures.

Lessons

4.1 Programming Fundamentals

  • Programming Languages
  • Programming Languages
  • Compilers vs. Interpreters
  • Compilers vs. Interpreters Reflection
  • How to Choose a Programming Language
  • +3 more

4.2 Printing in Java

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

4.3 Variables and Types

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

4.4 User Input

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

4.5 Arithmetic Expressions

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

4.6 Casting

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

4.7 Booleans

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

4.8 Logical Operators

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

4.9 Comparison Operators

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

4.10 For Loops

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

4.11 While Loops

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

4.12 If Statements

  • If Statements
  • If Statements
  • Negative Numbers
  • Even and Odd
  • Find the Minimum
  • +3 more

4.13 Loop-and-a-Half

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

4.14 Short-Circuit Evaluation

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

4.15 De Morgan's Laws

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

4.16 Strings

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

4.17 Basic Java Quiz

  • Basic Java Quiz

Courses that include this module