Java Programming Quiz
Quiz
•
Other
•
University
•
Practice Problem
•
Easy
Osama Alali
Used 4+ times
FREE Resource
Enhance your content in a minute
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Fundamental dan Dunia TD
Quiz
•
9th Grade - University
10 questions
Study Quest KSU STC initiative
Quiz
•
University
10 questions
Kế toán chi phí - C4 - Q2
Quiz
•
University
10 questions
Gujarati - shabdakosh
Quiz
•
University
15 questions
Quiz KPU Goes To Campus
Quiz
•
University
10 questions
Capital Budgeting and Capital Ratioining Quiz
Quiz
•
University
12 questions
Квиз "Города"
Quiz
•
University
10 questions
Dental Amalgam Quiz
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University
