Java Programming Review

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

flashcard set

Earn XP

Description and Tags

These flashcards cover key concepts from Java programming, focusing on variables, types, operations, control flow, and specific syntax used in Java.

Last updated 1:14 AM on 12/9/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards

What does a variable in memory have, along with a type?

An identifier.

2
New cards

What is the eighth primitive type defined by Java, in addition to int, double, char, boolean, byte, short, and long?

float

3
New cards

What does declaring a variable state?

That it exists.

4
New cards

What is the term for assigning a variable an initial value?

Initialization

5
New cards

In Java, what keyword is used to declare variables that are constant and cannot be changed after initialization?

final

6
New cards

Which arithmetic operator, besides +, -, *, and /, is explicitly supported on primitive types in Java?

% (modulo)

7
New cards

What rules does Java follow when calculating expressions?

Common order-of-operation rules.

8
New cards

When converting data in a widening conversion, what is the characteristic of the target type's storage size compared to the original?

It has the same or more bits of storage.

9
New cards

When might narrowing conversions lose information regarding the storage size of the target type?

When converting to a type that has fewer bits of storage.

10
New cards

What property does string concatenation share with the + and - operators, in terms of how expressions are evaluated?

Precedence

11
New cards

What does type casting tell Java to do?

Convert one type to another.

12
New cards

Provide examples of type casting in Java: one for converting an int to a double, and another for truncating a double to an int.

To convert int to double: Doubleaverage=(double)12/5;Double average = (double) 12 / 5; To truncate a double to an int: intfeet=(int)(25.0/12.0);int feet = (int) (25.0 / 12.0);

13
New cards

What symbol represents the basic assignment operation in Java?

=

14
New cards

What is another looping construct in Java, besides for and while, that is part of control flow structures?

do-while

15
New cards

In switch statements, execution begins on the first case that matches the value of which variable?

The switch variable.

16
New cards

Which keyword in switch statements is used for the default case if no other cases were hit?

default