Back to marketplace

Chapter 2: Using Objects

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

What are objects?

Back (Answer)

the “building blocks” of java, which can be manipulated, and have their own behavior

#2
Front (Question)

What does a method consist of

Back (Answer)

a sequence of instructions that can access the internal data of an object

#3
Front (Question)

What is NOT important for a programmer to understand

Back (Answer)

HOW an object gets its work done

#4
Front (Question)

What does a class allow a programmer to do?

Back (Answer)

apply the same method to multiple objects

#5
Front (Question)

what are variables used for?

Back (Answer)

to store data

#6
Front (Question)

What is this code an example of: int width = 20;

Back (Answer)

a variable

#7
Front (Question)

What are the two syntaxes for a variable

Back (Answer)

typeName variableName = value; OR typeName variableName;

#8
Front (Question)

Write a variable that stores: Hello, Dave!

Back (Answer)

String greeting = “Hello, Dave!”;

#9
Front (Question)

What is a variable?

Back (Answer)

a storage location in a computer program

#10
Front (Question)

What do you usually specify when declaring a variable?

Back (Answer)

an initial value

#11
Front (Question)

What must you specify when declaring a variable

Back (Answer)

a type

#12
Front (Question)

What is the type for whole numbers?

Back (Answer)

intiger (int)

#13
Front (Question)

What type of number includes a fraction?

Back (Answer)

floating-point number

#14
Front (Question)

What is this an example of? double milesPerGallon = 22;

Back (Answer)

declaring a variable that holds a floating-point number

#15
Front (Question)

What type is used for floating-point numbers?

Back (Answer)

double

#16
Front (Question)

How do you combine numbers?

Back (Answer)

through arithmetic operators such as +, -, *, /

#17
Front (Question)

What does a type specify

Back (Answer)

the operations that can be carried out with its values

#18
Front (Question)

What should a name explain?

Back (Answer)

its purpose

#19
Front (Question)

What are the name rules?

Back (Answer)

1.) the first character must be a letter or underscore, the remaining characters must be letters, numbers, or underscores 2.) use camelcase, capitalization instead of space 3.) names are case sensitive 4.) you cannot use reserved words

#20
Front (Question)

What is this an example of? milesPerGallon

Back (Answer)

camelcase

#21
Front (Question)

What are these an example of? double, class

Back (Answer)

reserved words

#22
Front (Question)

How, by convention, should you name your names

Back (Answer)

should start with a lowercase letter

#23
Front (Question)

What are comments

Back (Answer)

explanations for human readers of you code

#24
Front (Question)

What is this an example of? double milesPerGallon = 33.8; //The Average fuel efficiency of new US cars in 2011

Back (Answer)

a comment