Language Basics Flashcards

1
Q

in the Java programming language, the terms “field” and «…» are both used

A

variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

objects store their individual states in “…”

A

non-static fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Non-static fields are also known as …

A

instance variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Non-static fields are also known as instance variables because …

A

their values are unique to each instance of a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A … is any field declared with the static modifier

A

class variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Exactly … copy of “class variable” in existence, regardless of how many times the class has been instantiated

A

one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Similar to how an object stores its state in fields, a method will often store its temporary state in …

A

local variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

… variable is declared between the opening and closing braces of a method

A

local

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

variables in method signature is called ..

A

parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The convention, however, is to always begin your variable names with a …

A

letter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The … character, by convention, is never used at all

A

dollar sign

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When choosing a name for your variables, use … instead of cryptic abbreviations

A

full words

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How to name constant variable? (static final)

A

capitalize every letter and separate subsequent words with the underscore character

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

If the name you choose consists of only one word, spell that word in all …

A

lowercase letters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

If name consists of more than one word, … of each subsequent word

A

capitalize the first letter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly