
Java Programming Quiz

Quiz
•
Other
•
University
•
Medium

Niveditha N
Used 1+ times
FREE Resource
57 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which method is used to sort an array in Java?
Collections.sort()
Arrays.sort()
array.sort()
sort.array()
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is a valid declaration of a 2D array?
int[][] arr = new int[2][3];
int arr[][] = new int[2,3];
int arr[] = new int[2][3];
int arr[2][3];
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What does this code print? int[][] matrix = { {1, 2}, {3, 4} }; System.out.println(matrix[1][1]);
2
3
4
1
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which loop is best for traversing arrays in Java?
while
do-while
for
goto
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following code? String s1 = "Java"; String s2 = "Java"; System.out.println(s1 == s2);
true
false
error
null
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which method is used to compare two strings by ignoring case?
equals()
equalsIgnoreCase()
compareTo()
compareIgnoreCase()
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is used to concatenate two strings?
concat()
append()
+ operator
All of the above
Create a free account and access millions of resources
Similar Resources on Wayground
60 questions
CN unit 2

Quiz
•
University
60 questions
operating system (unit-5)

Quiz
•
University
55 questions
AP pages 5 and 6

Quiz
•
University
60 questions
OLIMPIADE AKUNTANSI TAHUN 2019

Quiz
•
University
61 questions
trach nhiem tin 11 gk2

Quiz
•
11th Grade - University
55 questions
2. Work-life balance

Quiz
•
University
55 questions
Economics Multiple Choice Questions

Quiz
•
University
60 questions
Psychological Statistics Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade
Discover more resources for Other
15 questions
Disney Trivia

Quiz
•
University
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University
20 questions
Disney Trivia

Quiz
•
University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
5 questions
Examining Theme

Interactive video
•
4th Grade - University
23 questions
Lab 4: Quizziz Questions

Quiz
•
University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University