CodeGym /Java Course /Java Collections /Interview questions | Level 1

Interview questions | Level 1

Java Collections
Level 1 , Lesson 14
Available

"Hi, Amigo!"

Interview questions
1 Can a File object correspond to a file that doesn't yet exist?
2 How do you convert a File object to a Path?
3 Why do we need the Files class?
4 What classes for zipping do you know?
5 How do you add a directory to an archive?
6 Why do we need Properties?
7 How is data stored in a .properties file?
8 Can I change the data in a Properties object after loading it from a file?
9 Why do we need the FileReader class?
10 Why do we need the FileWriter class?
Comments (4)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Andrei Level 41
16 June 2021
Does anyone learn/knows these answers by heart? Or do you just google, read, think to yourself "I see" and then move on? I am curious of how people approach this part of the chapter.
元. Level 26, Taipei, Taiwan, Province of China
2 May 2023
I read related articles directly on google
Ewerton Level 30, Belo Horizonte, Brasil
8 July 2019
Shouldn't 5 be: "How do you add an archive to a directory?"
Rohit Aggarwal Level 32, New Delhi, India
17 May 2020
It looks correct. I guess the question here really is something like this: Assume you already have an archive and you want to add a new directory containing some files to it, how would you do so?