stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Java Day #2: Data Types and Naming Conventions Flashcards | StudBud
Explore
/
Java Day #2: Data Types and Naming Conventions
Java Day #2: Data Types and Naming Conventions
10 terms
·
StudBud Administration
·
95 plays
data types and variable names #java #introtojava
Flashcards
10 cards
F
Practice quiz
P
Host live
L
Questions
10
Answers
1
What's the best data type to use for 'h'?
boolean
int
char
double
2
Java does not execute instructions on a computer directly, but rather on the ____.
Java Virtual Reality
Java Virtual Machine
Machine of Java
company's mainframe
3
The code below shows 4 int variables being initialized. Which is the most appropriate name?
line 7
line 6
line 5
line 4
4
Syntax is:
Punctuation
Rules that must be followed when writing a program
Symbols or words that perform operations
Words having a special meaning in Java
5
What's the best data type to use for -5?
char
double
boolean
int
6
Which two lines of code have an error?
lines 5 and 6
lines 6 and 7
lines 4 and 5
lines 4 and 6
7
What's the best data type to use for the number 14?
char
double
int
boolean
8
What's the best data type to use for -3.992?
double
int
boolean
char
9
What's the best data type to use for true?
double
char
int
boolean
10
Which variable will the compiler complain about, and why?
line 6: the value for dee should be 'R'
they're all kind of dumb, but technically OK
line 4: an int cannot be called "letter"
line 5: the name is too long