Tian2 田二
Library AP Computer Science A Unit 2: Selection and Iteration
⁂   AP Computer Science A · Unit 2

2. Selection and Iteration

25–35% of the AP exam. Key topics: Boolean expressions using &&, ||, and !, De Morgan's Laws, if / else if / else branching, Nested conditionals, while loops and loop termination conditions, for loops and loop control variables, Infinite loop detection and prevention, String traversal using index-based loops with substring() and charAt(), Nested loops and their output patterns, Compound assignment operators: +=, -=, *=, Comparing loop structures for efficiency and clarity.

25–35% exam weight standard track

Unit 2: Selection and Iteration

Study guide content for this unit is being prepared. Check back soon for complete lesson notes, formula sheets, and worked examples.

Topics in this unit

  • Boolean expressions using &&, ||, and !
  • De Morgan's Laws
  • if / else if / else branching
  • Nested conditionals
  • while loops and loop termination conditions
  • for loops and loop control variables
  • Infinite loop detection and prevention
  • String traversal using index-based loops with substring() and charAt()
  • Nested loops and their output patterns
  • Compound assignment operators: +=, -=, *=
  • Comparing loop structures for efficiency and clarity