Exam Concept part 1

¡Supera tus tareas y exámenes ahora con Quizwiz!

-15 % -4 is ________.

-3

-5 % 5 is ________.

0

5 % 1 is ________.

0

5 % 5 is ________.

0

________ are valid Java identifiers.

1) $Java 2) _RE4

You can assign the value in ________ to an int variable.

1) 'x' 2) 93

5 % 3 is ________.

2

Which of the following are not valid assignment statements?

55 = x;

parseDouble is a method in the ________ class.

Double

If you attempt to add an int, a byte, a long, and a float, the result will be a ________ value.

double

You can always assign a value of long type to a variable of int type without loss of precision.

false

You can define a constant twice in a block.

false

You can define a variable twice in a block.

false

The keyword ________ must be used to declare a constant.

final

To declare a constant PI, you write ________.

final double PI = 3.14159;

Which of the following assignment statements is illegal?

float f = 34.0;

A Java statement ends with a ________.

semicolon (;)

A constant can be defined using using the final keyword.

true

The value of a variable can be changed.

true

You can cast a character value to an int, or an int to char.

true

To assign a double variable d to an int variable x, you write ________.

x = (int)d;


Conjuntos de estudio relacionados

Desire2Learn Glossary: Module 8 Smart Spending

View Set

Endocrine System Pituitary Pineal

View Set

Ch 12 Psychological Disorders Questions

View Set

Public relation case campaigns (COM 235)

View Set

Bus321 - Missed/Iffy Questions from Practice Final Exam

View Set

Chapter 8: Business Organization

View Set