
Unit 1 Primitive Types Test

Quiz
•
Computers
•
11th - 12th Grade
•
Medium
Cynthia Harrison
Used 227+ times
FREE Resource
Student preview

45 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the correct way to declare an integer variable?
int x = 3;
integer x = 3;
integer x is 3;
int x is 3;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the correct numeric java type to use for decimals?
Integer
Double
Char
Boolean
String
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which variable declaration below is correct?
int a = 4.5;
char grade = 95;
int a = 3/4;
char grade = 'A';
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which option correctly declares a string variable?
String name = Chris;
string name = "Chris";
string name = 'Chris';
String name = "Chris";
String name = 'Chris';
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which variable name is invalid?
eightName
_8name
8name
$eightname
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which code segment will print “Hello Karel” to the screen in Java?
System.out.printLine("Hello Karel");
print "Hello Karel";
System.out.println("Hello Karel");
System.println("Hello Karel");
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code segment output?
System.out.println("Hello");
System.out.println("World");
Hello
World
HelloWorld
Hello World
Hello
World
Create a free account and access millions of resources
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade