CodeHS 4.9 Local Variables and Scope

CodeHS 4.9 Local Variables and Scope

9th - 12th Grade

7 Qs

quiz-placeholder

Similar activities

Word 2016 Lesson 1

Word 2016 Lesson 1

9th - 12th Grade

10 Qs

ICT as Platform for Change

ICT as Platform for Change

11th - 12th Grade

10 Qs

emtech

emtech

12th Grade

10 Qs

Visual Basic 2010

Visual Basic 2010

8th Grade - University

10 Qs

Contact Center Sevices

Contact Center Sevices

7th - 10th Grade

10 Qs

Questionário Aula 6 - Int. à Inf. (Segurança e Proteção)

Questionário Aula 6 - Int. à Inf. (Segurança e Proteção)

10th Grade

10 Qs

Cuestionario Steve Jobs

Cuestionario Steve Jobs

12th Grade - University

10 Qs

Fondo de pantalla

Fondo de pantalla

10th Grade

10 Qs

CodeHS 4.9 Local Variables and Scope

CodeHS 4.9 Local Variables and Scope

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Aaron Pavao

Used 22+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?