Unit 1 Day 13: Object Instantiation Practice
Share
Unit 1, Section 1.13
Day 13 Practice • January 19, 2026
🎯 Focus: Object Instantiation
Practice Question
Which statement correctly creates a new
Scanner object to read input from the keyboard?
What This Tests: This question tests the correct syntax for creating (instantiating) an object using the
new keyword and calling a constructor.Key Concept: Object Instantiation
// Syntax: ClassName variableName = new ClassName(arguments);
Scanner sc = new Scanner(System.in); // ✓ Correct
↑ ↑ ↑ ↑ ↑
Type Name new Constructor Argument
Common Mistakes
Mistake: Answer A - Missing "new" keyword
You MUST use new to create an object. Without it, Java looks for a method called Scanner(), which doesn't exist.
Mistake: Answer B - Missing constructor argument
Scanner requires an input source (like System.in). The no-argument constructor doesn't exist for Scanner.
Object Creation Pattern
💡 The "new" Keyword
The new keyword does three things:
1. Allocates memory for the object
2. Calls the constructor to initialize it
3. Returns a reference to the new object
// More examples:
String s = new String("Hello");
ArrayList<Integer> list = new ArrayList<>();
Random rand = new Random();
Difficulty: Easy • Time: 1 minute • AP Skill: 2.C - Call methods
Want More Practice?
Master AP CSA with guided practice and expert help
Schedule 1-on-1 Tutoring Practice FRQs