AP Computer Science a · Question of the Day

AP Computer Science a Question of the Day

A fresh daily question to build accuracy, reinforce recall, and turn practice into a steady habit.
Monday, September 7, 2026

Which code segment shows a variable declaration but NOT an initialization?

Keep practicing AP Computer Science a

Question of the Day

Answer today's AP Computer Science a question, reveal the full explanation, then keep the streak going with a new question every day.

Which code segment shows a variable declaration but NOT an initialization?

  1. int score = 100;
  2. int score; (correct answer)
  3. score = 100;
  4. String score = "100";

Explanation: A declaration introduces a variable's name and type (int score;). An initialization gives it its first value (= 100). Option (B) declares the variable score but does not assign it an initial value.