Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CodeHS 4.11 Primitives vs Objects

Total questions: 8

Worksheet time: 5mins

Name
Class
Date
1.

What is the convention for the names of object types?

a)

the type name starts with a capital letter

b)

using camel case

c)

the name must be at least 5 characters long

d)

the name must be a noun

2.

Which of these is an instance of a class?

a)

object

b)

primitive

3.

What does an object variable store?

a)

a memory address

b)

a value

c)

multiple values

d)

a primitive

4.

What is the value of zim?

a)

true

b)

false

5.

What is the value of zim?

a)

true

b)

false

6.

How are objects passed to methods?

a)

By value of the address: you can change the original parameter object in a method

b)

By value of the object: if you change the value in the method the original stays the same

c)

By value of the class: any changes to one object also affects other instances of that class

d)

By Amazon: you have to wait like 5-10 days unless you have a subscription account

7.

When an object variable is declared, what is it pointing to?

a)

The first available memory address

b)

nothing, it's a null pointer

c)

the memory address of the class

d)

the memory address of the instance

8.

What is a healthy snack packed with plenty of potasium?

(a)