testdir An example of a testdir directory with two directories d1 and d2 and two files f1 and f2. The directory d1 has one file f12, and so on. +--f1 +--d2 +--d22 Hint: To do this, you wi1 have to use java.io.File. +-- f221 +--f21 +--d21 +-- f212 +--f211 +--f2 +--d1 +--f12

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question

Write a program that prompts the user for a path and displays the directory structure
on the command tool as follows:

testdir
An example of a testdir directory with
two directories d1 and d2 and two files
f1 and f2. The directory d1 has one file
f12, and so on.
+--f1
+--d2
+--d22
Hint: To do this, you wi1 have to use
java.io.File.
+-- f221
+--f21
+--d21
+-- f212
+--f211
+--f2
+--d1
+--f12
Transcribed Image Text:testdir An example of a testdir directory with two directories d1 and d2 and two files f1 and f2. The directory d1 has one file f12, and so on. +--f1 +--d2 +--d22 Hint: To do this, you wi1 have to use java.io.File. +-- f221 +--f21 +--d21 +-- f212 +--f211 +--f2 +--d1 +--f12
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L