What is the term for a variable declared inside a method?
CodeHS 4.9 Local Variables and Scope

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Aaron Pavao
Used 21+ times
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
method variable
local variable
global variable
private variable
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where does a variable that is declared inside a method exist?
only in that method
only in the class the method is in
only in methods that declare the variable
as long as the program is running
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is scope?
the part of a program where the variable exists
a minty mouthwash
a device used to aim a projectile
a device in a submarine that is used to view the surface
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What characters denote a block?
< >
[ ]
{ }
( )
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where does a variable exist?
from when it's declared to the end of the block it's in
from when it's declared to the end of the method it's in
from when it's declared to the end of the class it's in
from when it's declared to the end of the program it's in
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When two variables have the same name, which one does Java use?
the one with the most specific scope
the one with the most general scope
the one with the most private scope
the one with the lowest memory address
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when a variable is given the same name as a variable with a different scope?
shadowing
RepeatedNamingException
syntax error
infinite loop
Similar Resources on Quizizz
10 questions
2.2.1 Variables and Functions

Quiz
•
12th Grade
10 questions
QUARTER3 MOD 1 TO 5

Quiz
•
10th Grade
10 questions
TLE Q3 M1-5

Quiz
•
10th Grade
10 questions
gambare

Quiz
•
10th Grade
10 questions
7. PYTHON FUNCTIONS -2

Quiz
•
12th Grade
10 questions
QUARTER 3 MOD 1-5

Quiz
•
10th Grade
10 questions
Advanced Java Study Guide

Quiz
•
11th - 12th Grade
9 questions
Object Oriented Programming

Quiz
•
11th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University