
JAVA Programming QUIZ - 1

Quiz
•
Computers
•
University
•
Hard
Anitha R
Used 6+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Identify the invalid constant declaration:
final int strength = 100;
final intpass_mark = 50;
final int max value = 50
final float P1 = 3.14159;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In java characters are compared based on their _______ values.
Bytecode
Unicode
Ascii code
Assembly code
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output of the following code:
public class Main {
public static void main(String[] args) {
String[] fruits = {"Apple","Mango","orange","Grapes"};
fruits[1] ="pineapple";
System.out.println(fruits[1]);
}
}
Apple
Mango
orange
pineapple
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output of the following code:
public class Main {
public static void main(String[] args) {
int[][] myNumbers = { {1, 2, 3, 4}, {5, 6, 7} };
int x = myNumbers[1][2];
System.out.println(x);
}
}
1
2
5
7
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public class Main {
public static void main(String[] args) {
System.out.println(Math.abs(-9.7));
}
}
-9.7
9,7
. 9
error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these operators can be used to concatenate two or more String objects?
+
+=
&
||
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output of the progrm
classMain {
public static void main(String args[]) {
int x = 0;
int y = 10;
int z = y/x;
}
}
Compiler error
Compiles and Run file
Compiles fine but throws arithmetic exception.
None
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Java Quiz

Quiz
•
University
15 questions
Java Method

Quiz
•
University
15 questions
Java Quiz based on array

Quiz
•
University
18 questions
Array_to be discussF3

Quiz
•
University
20 questions
Java Coding Questions

Quiz
•
University
15 questions
002_Java Methods

Quiz
•
12th Grade - University
23 questions
msp quiz

Quiz
•
University - Professi...
18 questions
Java Como Programar - Deitel - Cap 1 e 2

Quiz
•
University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
34 questions
WH - Unit 2 Exam Review -B

Quiz
•
10th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
10 questions
Transition Words

Quiz
•
University
5 questions
Theme

Interactive video
•
4th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
10 questions
Spanish Greetings and Goodbyes!

Lesson
•
6th Grade - University