Video is locked.

Unlock the full course today

Join today to access over 15,000 courses taught by industry experts or purchase this course individually.

Advanced Java Programming

Working with directories in Java

From the course: Advanced Java Programming

Start my 1-month free trial
  • Course details

    Want to get more out of the Java language and platform? In this platform- and framework-neutral course, instructor Bethan Palmer digs into some of the language’s more advanced features, helping you expand your programming skills as she equips you with techniques you can use when building applications anywhere Java is used: in web, mobile, and desktop applications. Bethan covers a variety of topics, including generics, working with the Collections Framework, and functional programming. Plus, learn about I/O in Java, working with files and directories, and structuring applications using the modular system available in Java.


    • Click here to view Bethan Palmer’s instructor page

      Bethan Palmer

      Software Developer and Java Champion

      Bethan Palmer is a developer who loves technology and has a master's degree in computer science.

      For her day job, Bethan is a Java programmer and the product manager for a Java PDF library at IDRsolutions. She gets to spend a lot of time writing and refactoring code, as well as deciding on product strategy and road maps.

      She also spends much of her time attending conferences and is a regular speaker at Oracle Code One and NetBeans Days. She manages and writes articles about Java, technology, the books she's reading, and conferences she's attending on the Java PDF blog.

    Skills covered in this course

  • Learn advanced Java programming

    - [Instructor] Sometimes it is useful to be able to work with directories in a file system. For example, you might need to list files in a directory or create a new directory. To list everything inside a directory, I first need to create an array of strings which I will call contents. Then I put equals new file. I want to list everything in my current directory so I just need to put a speech mark and a dot between them. Then I call the list method. I also need to make sure I have the imports for file. Now I have an array containing the name of every item in my current directory. I will add a simple for loop to print out each string in the array on a new line. When I run the program, I see all of the contents in my current directory. Some of them are files, for example, build.xml and The others, which do not have file extensions, are more directories. It is also simple to create new directories. If I want to create a new directory called myDirectory, I just create a new…

  • Practice while you learn with exercise files

    Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.

    Download the exercise files for this course. Get started with a free trial today.

  • Download courses and learn on the go

    Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.

    Watch this course anytime, anywhere. Get started with a free trial today.