JAVA - Day5

JAVA - Day5

University

10 Qs

quiz-placeholder

Similar activities

Operating System Concepts Quiz

Operating System Concepts Quiz

University

10 Qs

Sistem Operasi

Sistem Operasi

University

10 Qs

Lec3_Part1

Lec3_Part1

University

10 Qs

Jenis-Jenis Virus Komputer

Jenis-Jenis Virus Komputer

12th Grade - University

15 Qs

Prak Sistem Operasi

Prak Sistem Operasi

University

14 Qs

Diploma in IT - Computer Savvy Quiz

Diploma in IT - Computer Savvy Quiz

University

15 Qs

4C's

4C's

University

10 Qs

Pre-tes Komputer dan Perangkat Penyusunnya

Pre-tes Komputer dan Perangkat Penyusunnya

10th Grade - University

10 Qs

JAVA - Day5

JAVA - Day5

Assessment

Quiz

Information Technology (IT)

University

Medium

Created by

Chitra Muthu

Used 5+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which class in Java is used to read character data from a file?

FileReader

FileWriter

  • FileInputStream

PrintWriter

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which of the following is true about FileWriter?

It is used for writing character data to a file.

It is used for writing byte data to a file.

It reads character data from a file.

It reads byte data from a file.

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which class provides efficient reading of characters, arrays, and lines?

FileWriter

FileReader

BufferedWriter

BufferedReader

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

: What is the primary advantage of using BufferedWriter over FileWriter?

It allows faster writing by using a buffer.

It can read data from the console.

It supports serialization.

It is used for reading object data.

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

How can you create a thread in Java?

By extending the Thread class.

By implementing the Runnable interface.

By using a lambda expression.

All of the above.

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which method is called when a thread starts?

run()

start()

execute()

init()

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which of the following is not a valid thread state in Java?

New

Running

Waiting

Pending

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?