Introduction to File Handling

Introduction to File Handling

6th - 12th Grade

5 Qs

quiz-placeholder

Similar activities

MIL March 8, 2023

MIL March 8, 2023

12th Grade

10 Qs

THE PHOTOSHOP WINDOW

THE PHOTOSHOP WINDOW

7th - 8th Grade

10 Qs

Access - Lesson 14

Access - Lesson 14

9th - 12th Grade

10 Qs

ICT 10 : Introduction to Adobe Illustrator(CS5)

ICT 10 : Introduction to Adobe Illustrator(CS5)

10th Grade

10 Qs

CF Unit 10

CF Unit 10

7th Grade

10 Qs

Asesmen Unit One dan Unit Two MIT APP INVENTOR

Asesmen Unit One dan Unit Two MIT APP INVENTOR

8th Grade

10 Qs

Design Graphic Week 1

Design Graphic Week 1

7th Grade

10 Qs

Know thy Peer-to-Peer

Know thy Peer-to-Peer

12th Grade

10 Qs

Introduction to File Handling

Introduction to File Handling

Assessment

Quiz

Computers

6th - 12th Grade

Hard

Created by

Whizara Teacher

FREE Resource

AI

Enhance your content in a minute

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

5 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following activities can be done using File Handling in Java?

creating a file

reading from a file

deleting a file

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method from the ‘File’ class is used to create a new file?

File()

createNewFile()

copyFile()

delete()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which class in Java is used to write data to a file?

File class

FileWriter class

 FileReader class

 Scanner class

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if the todo_list.txt does not exist, and we run the following code?

FileWriter myWriter = new FileWriter("todo_list.txt");

myWriter.write("1. Complete Math homework");

It will result in an Error

The FileWriter will create a new file with the name todo_list.txt, and then write the data in it

The FileWriter will write the data in a random file

none of the mentioned

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method do we use to close a FileWriter object filewriter, so that the changes are saved?

filewriter.close()

filewriter.open()

filewriter.copy()

none of the mentioned