WorksheetsCodeHS 4.11 Primitives vs Objects
Total questions: 8
Worksheet time: 5mins
What is the convention for the names of object types?
the type name starts with a capital letter
using camel case
the name must be at least 5 characters long
the name must be a noun
Which of these is an instance of a class?
object
primitive
What does an object variable store?
a memory address
a value
multiple values
a primitive
What is the value of zim?
true
false
What is the value of zim?
true
false
How are objects passed to methods?
By value of the address: you can change the original parameter object in a method
By value of the object: if you change the value in the method the original stays the same
By value of the class: any changes to one object also affects other instances of that class
By Amazon: you have to wait like 5-10 days unless you have a subscription account
When an object variable is declared, what is it pointing to?
The first available memory address
nothing, it's a null pointer
the memory address of the class
the memory address of the instance
What is a healthy snack packed with plenty of potasium?
(a)
