Stars

This article is a part of the Java Programming Language article series.

  • Walking the File Tree
  • Finding Files
  • Watching a Directory for Changes

The FileVisitor Interface

  • Specifies the required behavior at key points in the traversal process
  • A simple implementation: the SimpleFileVisitor class

Key points

  • When a file is visited…

Milky Way

This article is a part of the Java Programming Language article series.

  • Improve the readability of the software
  • Files longer than 2000 lines should be avoided

Beginning Comments

Package and Import Statements

  • 4 spaces should be used as the unit of indentation
  • Spaces vs tabs

Line Length

  • Avoid…


Andromeda

This article is a part of the Java Programming Language article series.

  • Sorting
  • Shuffling
  • Routine Data Manipulation
  • Searching
  • Composition
  • Finding Extreme Values
  • Reorders a List in ascending order
  • Uses merge sort algorithm
  • The sort method:
    Collections.sort(list);
    Collections.sort(list, comparator);
  • The opposite of sort
  • In all possible permutations with equal likelihood
  • Useful…


Andromeda

This article is a part of the Java Programming Language article series.

JDK 8 and later, the preferred method of iterating over a collection is to obtain a stream and perform aggregate operations on it.

  • A sequence of aggregate operations
  • A source
  • Zero or more intermediate operations
  • A…


Milky Way

This article is a part of the Java Programming Language article series.

  • Refer to the existing method by name

Person class

Sort the array by age

The sort method signature

Lambda expression

  • The Comparator interface is a functional interface

Method reference

  • Lambda expression: (a, b)…

Milky Way

This article is a part of the Java Programming Language article series.

  • Java API for database access
  • A separate JDBC driver is used for each system
  • A collection of data
  • Database objects that contains the data
  • Has rows and columns
  • Rows: records
  • Columns: field in the record

Milky Way

This article is a part of the Java Programming Language article series.

  • Treat functionality as method argument, or code as data
  • For anonymous class implementations
  • Looks a lot like a method declaration
  • Consider as anonymous methods: methods without a name

A comma-separated list of parameters enclosed in parenthese

  • Omit the…

Milky Way

This article is a part of the Java Programming Language article series.

  • Read, Write, and Create File
  • Random Access Files
  • Create and Read Directories
  • Links, Symbolic or Otherwise
  • Other Useful Methods
  • Legacy File IO

Milky Way

This article is a part of the Java Programming Language article series.

  • Versions
  • NIO.2
  • Path
  • Path Operations
  • Check, Delete, Copy, and Move a File or Directory
  • Managing Metadata (File and File Store Attributes)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store