
Quiz 1

Quiz
•
Computers
•
University
•
Hard
Ms. Asst.Prof
Used 3+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x=5, y=20;
x+=32;
y/=4;
System.out.println("x="+x+", y="+y);
x=32, y=4
x=9, y=52
x=37, y=5
x=160, y=80
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Every Java application program must have
a class named MAIN
a method named main
comments
integer variables
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To print "Hello, world" on the moniter, use the following Java statement
SystemOutPrintln("Hello, world");
System.out.println{"Hello, world"}
System.out.println("Hello, world");
Print "Hello, world"
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output?
final double x=99.0;
x=54.3;
System.out.println("x="+x);
x=54.3
x=99
x=153.3
Nothing, this is an error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid Java statement?
String str='John Doe';
string str="John Doe";
string str='John Doe';
String str="John Doe";
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following does not describe a valid comments in Java?
Single line comments, two forward slashes - //
Multi-line comments, start with /* and end with */
Multi-line comments, start with / and end with /
Documentation comments, starting with /** and ending with */
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements correctly creates a Scanner object for keyboard input?
Scanner kbd = new Scanner(System.keyboard);
Scanner keyboard = new Scanner(System.in);
Scanner keyboard(System.in);
Keyboard scanner =new Keyboard(System.in);
Create a free account and access millions of resources
Similar Resources on Wayground
9 questions
String Methods

Quiz
•
12th Grade - University
10 questions
CMP128 Java Ch. 05 Methods

Quiz
•
University
12 questions
Lógica Programação

Quiz
•
University
10 questions
Briefing Operator Java

Quiz
•
University
18 questions
PBO Inheritance Episode 2

Quiz
•
University
15 questions
Bootcamp Day 3 - Java Array

Quiz
•
University
10 questions
Java Quiz 1

Quiz
•
University
9 questions
SPB Hfdstk 1 & 1.2

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University