Text file line shuffling in Java

This program is an elementary tutorial in Java illustrating basic syntax, subroutines and basic file I/O. Shuffling the lines of a text file is a very important step when preparing .csv training datasets for Machine Learning models. Java was originally created for rich web applications (see 'applets') and embedded programming, but it quickly became a general-purpose language with seminal cross-platform deployability due to the JVM design. In this example, legacy Java syntax is used for illustrating coding with the very first release (JDK 1.0) back in 1995. This means no support for generics, i.e., only 'Object'-based containers (Vector) and extremely limited API compared to recent versions. And of course no syntax highlighting or code completion features, which where not available in terminals with 'vi' and command-line compiler as the core development platform. Of course, the source can be compiled with today's Java 19 compiler just fine, with the -Xlint:unchecked option (ignore the warnings produced).
Enable captions for more details and walk-through. Source code available at the Github repository (see channel info). Tags: #asmr #coding #programming #notalking #java #terminal #console

Comments

Popular Posts

Hello x86: Low-level assembly coding for the 8086

Announcement: Writing a new book in Data Science and R&D projects

Fibonacci numbers in C (4 different ways)

Multiplication tables in COBOL

Bricks and towers in Prolog

Channel Updates