Weekly Assignment APP - Viva

Weekly Assignment APP - Viva

University

20 Qs

quiz-placeholder

Similar activities

Quiz tentang Google Colab

Quiz tentang Google Colab

10th Grade - University

20 Qs

Keterampilan Informatika dan Komputer

Keterampilan Informatika dan Komputer

11th Grade - University

18 Qs

Lista de Exercícios – Vetores em Java - Parte I

Lista de Exercícios – Vetores em Java - Parte I

University

15 Qs

Profesi Utama di Bidang Informatika

Profesi Utama di Bidang Informatika

10th Grade - University

15 Qs

JavaScript Lesson 1

JavaScript Lesson 1

11th Grade - University

20 Qs

PSC - JAVA (revisão)

PSC - JAVA (revisão)

University

19 Qs

KTPM-GROUP-2

KTPM-GROUP-2

University

17 Qs

10° TIC Preguntas sobre Software de Desarrollo #2

10° TIC Preguntas sobre Software de Desarrollo #2

10th Grade - University

20 Qs

Weekly Assignment APP - Viva

Weekly Assignment APP - Viva

Assessment

Quiz

Information Technology (IT)

University

Medium

Created by

Guruswaminathan J

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which package is required to use the Scanner class in Java?

java.util

java.lang

java.scanner

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the difference between nextInt() and nextLine() in the Scanner class?

nextInt() reads a whole line, nextLine() reads only an integer

nextInt() reads an integer, nextLine() reads a full line of text

Both read only numbers

Both read only strings

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which statement about BufferedReader and Scanner is correct?

Scanner is faster than BufferedReader

BufferedReader can directly parse integers and doubles, while Scanner cannot

Scanner is easier to use for parsing primitives, while BufferedReader is faster for reading large inputs

Both are identical in performance and usage

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the key difference between a while loop and a do-while loop in Java?

while loop executes at least once, do-while may not execute

do-while loop executes at least once, while may not execute

Both behave the same

do-while cannot use break or continue

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of this code?

int i = 1;

do {

System.out.print(i + " ");

i++;

} while(i < 1);

No output

1

1 2

Infinite loop

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the main purpose of a constructor in Java?

To create objects

To initialize object values

To destroy objects

To call methods automatically

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is it called when a class has multiple constructors with different parameter lists?

Constructor overriding

Constructor inheritance

Constructor overloading

Constructor chaining

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?