Java Set 2

Quiz
•
Other
•
University
•
Hard
ESPARK 2023
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Select the valid statement to declare and initialize an array.
int[] A = {}
int[] A = (1,2,3)
int[] A = {1, 2, 3}
int[][] A = {1,2,3}
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Find the value of A[1] after execution of the following program.
int[] a = {0,2,4,1,3};
for(int i = 0; i < a.length; i++)
a[i] = a[(a[i] + 3) % a.length];
0
1
2
3
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Unlike C-Arrays, the Java-Arrays have ___.
Names
Values
Methods and Fields
None
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
A failed method overriding calls the method of a ___ in Java.
Superclass
Subclass
Superclass or Subclass
None
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
class X implements Runnable {
public static void main(String args[]) {
/* Missing code? */
}
public void run() {
}
}
Which of the following line of code is suitable to start a thread ?
a)Thread t = new Thread(X);
b)Thread t = new Thread(X); t.start();
c)X run = new X(); Thread t = new Thread(run); t.start();
d)Thread t = new Thread(); x.run();
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Int i;
for(i = 1; i < 6; i++){
if(i > 3) continue;
}
System.out.println(i);
3
4
5
6
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
A Java Class inherits Constants and Methods of an Interface using ____ keyword.
INTERFACE
IMPLEMENTS
EXTENDS
All the above
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
NEW SYMPO Final round

Quiz
•
University
5 questions
Introduction to Remote Sensing

Quiz
•
1st Grade - University
10 questions
Internet of Things (IoT) with XDK110 Sensors

Quiz
•
University
10 questions
Quis 2 PJR

Quiz
•
University
10 questions
Tokens Lexeme and Pattern

Quiz
•
University
10 questions
Surface Design

Quiz
•
University
11 questions
mario

Quiz
•
1st Grade - Professio...
10 questions
Name that Fiber

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