Search Header Logo

Exceptions and I/O

Authored by Dr. Rahadianti

Other

University

Used 7+ times

Exceptions and I/O
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Apakah exception ini benar?
 IOException extends RuntimeExceptionIOException\ extends\ RuntimeException  

Salah 

Benar

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Custom exception dapat didefinisikan extends Exception

Benar

Salah

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Manakah yang bukan merupakan manfaat dari Exception?

Notifikasi error dari sebuah method yang dipanggil (callee) akan dikembalikan ke method yang memanggil (caller).

Program menjadi lebih cepat komputasinya.

Program lebih rapi karena memisahkan code untuk mendeteksi error dan yang meng-handle error.

Seandainya terjadi error, prorgram dapay berhenti secara elegan.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Exception yang harus dihandle oleh programmer agar program Java dapat dicompile adalah

Unchecked exception

Checked exception

Unchecked exception dan Checked exception

Bukan keduanya

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Sebisa mungkin kita sebaiknya memanfaatkan Exception class Java. Namun mungkin terkadang kita perlu menggunakan custom Exception. Apa keunggulan custom Exception yang tidak dimiiliki Exception bawaan Java?

Kita dapat mengirimkan informasi error yang terjadi pada method yang dipanggil ke method yang memanggil

Kita dapat mengirimkan informasi detail tentang error yang terjadi untuk kepentingan user

Kita dapat menambahkan attribut tambahan yang dibutuhkan sebagai informasi tambahan untuk user.

Kita dapat menghemat waktu dan resource komputasi

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Class File dapat digunakan untuk..

Merepresentasikan file

Menulis file saja

Membaca file saja

Menulis dan membaca file

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Manakah di antara method di bawah ini yang tidak mengandalkan delimiter untuk membaca input dari class Scanner?

next()

nextInt()

nextDouble()

nextLine()

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?