testquiz

testquiz

University

25 Qs

quiz-placeholder

Similar activities

Day 1 - Khởi Động "Video Marketing"

Day 1 - Khởi Động "Video Marketing"

University

20 Qs

Uji Pemahaman Array dan Fungsi

Uji Pemahaman Array dan Fungsi

11th Grade - University

20 Qs

Ujian Sumatif TIK Materi aplikasi Bandlab dan Capcut

Ujian Sumatif TIK Materi aplikasi Bandlab dan Capcut

9th Grade - University

20 Qs

Mesin Pencari Artikel

Mesin Pencari Artikel

11th Grade - University

20 Qs

PTS Genap Informatika Kelas XI

PTS Genap Informatika Kelas XI

11th Grade - University

20 Qs

Cyber Security (Firewall, Antivirus, dan Enskripsi)

Cyber Security (Firewall, Antivirus, dan Enskripsi)

11th Grade - University

20 Qs

Berpikir Komputasional

Berpikir Komputasional

3rd Grade - University

20 Qs

GDG ANDROID BOOTCAMP QUIZ

GDG ANDROID BOOTCAMP QUIZ

University

20 Qs

testquiz

testquiz

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Ahmad Awais

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

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

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

int[] arr = {2, 4, 6, 8};

System.out.println(arr[arr.length - 2]);

2

6

8

4

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which component would best be used for multiline text input in Swing?

JTextField

JTextArea

JPasswordField

JLabel

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is true about 2D arrays?

All rows must be the same length

You can't use indexes with them

They can only be declared dynamically

They can be jagged

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the following recursive function return?

int func(int n) {

if (n <= 0) return 1;

return n * func(n - 1); }

System.out.println(func(3));

3

9

6

1

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In exception handling, finally block:

Executes only if an exception occurs

Never executes

Always executes

Executes after catch only

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following can be used to catch an exception?

try-catch

catch-finally

try-finally

throw-catch

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which method is used to write text to a file?

File.read()

File.write()

write() of FileWriter

Scanner.next()

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

Already have an account?