JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Fundamentals of java.io and java.nio: differences, API evolution

    JAVA 25 SELF
    35 level,0 lecture
    This lecture is a brief guide to the evolution of file I/O in Java: from the “classic” java.io package with the File class, FileInputStream/ FileOutputStream streams, and character-based Reader/ Writer to modern java.nio.file (NIO.2) with Path, Files, and FileSystem. We’ll examine how the approaches differ, where asynchronous I/O shines, how to migrate safely ( File . toPath() ⇄ Path . toFile()), and also look at practical examples, a quick reference for choosing an API, and common mistakes.
    Open
  • File, Path, and Files classes: overview and object creation

    JAVA 25 SELF
    35 level,1 lecture
    In this lecture, we break down three key entities of Java’s file API: the historical File, the modern path abstraction Path from NIO.2, and the utility “Swiss Army knife” class Files. In practice, we’ll see how to create objects, convert File ↔ Path, safely join paths via resolve, obtain relative paths via relativize, normalize them with normalize, and perform operations such as Files.exists, Files.copy, Files.move, Files.readAllLines/ Files.write. The result is a clear understanding of when to use each approach and which mistakes are most common.
    Open
  • Reading and writing files: basic operations

    JAVA 25 SELF
    35 level,2 lecture
    In this lecture, we look at quick ways to work with files using the java.nio.file.Files utilities: read the entire file ( readAllBytes, readAllLines) and write data ( write) with an explicit charset StandardCharsets.UTF_8. We’ll discuss handling IOException, show practical examples, talk about when you need streaming APIs ( BufferedReader, BufferedWriter), and break down common mistakes.
    Open
  • File modes: reading, writing, appending

    JAVA 25 SELF
    35 level,3 lecture
    In this lecture, we examine file modes in Java: overwrite and append, combinations of StandardOpenOption options (for example, APPEND, CREATE, TRUNCATE_EXISTING, CREATE_NEW), working with text and bytes via Files.write()/ Files.readAllBytes(), when to choose streams ( BufferedReader/ BufferedWriter), and how to properly handle exceptions ( IOException, etc.). Plenty of practical examples and a breakdown of common mistakes.
    Open
  • Working with directories: create, delete, and list contents

    JAVA 25 SELF
    35 level,4 lecture
    A practical lecture on working with the file system via java.nio.file: create directories with Files.createDirectory and Files.createDirectories, delete via Files.delete and Files.deleteIfExists, list contents with Files.list, and cover recursive deletion with Files.walkFileTree. Step-by-step examples, a mini file manager, and a section on common mistakes will help you work confidently with folders on any OS.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy