Java Programming Quiz

Quiz
•
Other
•
University
•
Easy
Osama Alali
Used 4+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does it mean that Java is platform-independent?
Java can run on any operating system without modification.
Java can only run on Windows.
Java applications require special hardware.
Java cannot be used for web applications.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code:
int x = 5;
double y = x;
System.out.println(y);?
5
5.0
5.5
Error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code:
double x = 5.5;
int y = (int)x;
System.out.println(y);?
6
5.5
5
Error
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code:
String s = "Hello";
s = s.concat(" World");
System.out.println(s);?
Hello
World
Error
Hello World
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
int x = 10;
if (x > 5) {
System.out.println("Greater than 5");
} else {
System.out.println("Less than or equal to 5");
}
Greater than 5
Less than or equal to 5
Error
No output
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What method of the Scanner class is used to read an integer from the user?
nextLine()
next()
nextInt()
nextDouble()
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you declare a two-dimensional array of integers in Java?
int[][] array;
int array[][];
Both A and B
None of the above
Create a free account and access millions of resources
Similar Resources on Wayground
9 questions
Prova POO

Quiz
•
University
9 questions
Java basics quiz

Quiz
•
University
15 questions
CS102 QUIZ

Quiz
•
University
10 questions
B4 - The for Statement

Quiz
•
University
10 questions
HTML PHP C++

Quiz
•
University
10 questions
Struktur Data

Quiz
•
University
10 questions
Computer Programming (Theory)

Quiz
•
University
10 questions
array

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 Other
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