
CodeHS 4.9 Local Variables and Scope
Authored by Aaron Pavao
Computers
9th - 12th Grade
Used 22+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the term for a variable declared inside a method?
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Review
Quiz
•
9th - 12th Grade
10 questions
PREGUNTAS BÁSICAS SOBRE CONOCIMIENTO INFORMÁTICO
Quiz
•
1st Grade - Professio...
10 questions
BÀI CŨ 1 - TIN 10
Quiz
•
10th Grade
10 questions
1ero A Informatica II
Quiz
•
11th Grade
10 questions
Alapismeretek
Quiz
•
7th - 12th Grade
10 questions
Scratch
Quiz
•
KG - Professional Dev...
10 questions
Java: repetition control structure for & while
Quiz
•
10th - 12th Grade
10 questions
Lesson 1 Introduction to Database System
Quiz
•
10th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Exponent Properties
Quiz
•
9th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade