Java Set 2

Java Set 2

University

10 Qs

quiz-placeholder

Similar activities

NHẬN DẠNG DIODE

NHẬN DẠNG DIODE

University

10 Qs

Among Us

Among Us

1st Grade - Professional Development

13 Qs

Life of Jesus

Life of Jesus

KG - University

14 Qs

Project mc²

Project mc²

2nd Grade - Professional Development

11 Qs

Teaching as Vocation and Profession

Teaching as Vocation and Profession

University

10 Qs

BASIC OF RESEARCH

BASIC OF RESEARCH

11th Grade - Professional Development

15 Qs

Ingenieria Concurrente EQ. 3

Ingenieria Concurrente EQ. 3

University

13 Qs

SESI 1 : MATLAMAT KEWANGAN

SESI 1 : MATLAMAT KEWANGAN

University

10 Qs

Java Set 2

Java Set 2

Assessment

Quiz

Other

University

Practice Problem

Hard

Created by

ESPARK 2023

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?