file IO

Read and write files from code: text and binary, reading lines, copying, temp files, and streams, with tested examples and real output.

Groovy CSV Parsing and Generation – 10+ Tested Examples

Groovy CSV parsing and generation with 10+ examples. Split, tokenize, OpenCSV, read/write CSV files, handle headers and special chars on Groovy 5.0.6. “CSV files are the cockroaches of data formats – they survive everything and show up everywhere. Groovy gives you clean ways to deal with them.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 22 minutes CSV files are everywhere – data exports, spreadsheet dumps, log files, database ... Read More

Groovy Date and Time – Modern API Guide with 12 Tested Examples

Groovy date and time with the java.time API. 12+ examples covering LocalDate, LocalDateTime, ZonedDateTime, Duration, formatting. Groovy 5.0.6. “The only reason for time is so that everything doesn’t happen at once.” Ray Cummings, The Girl in the Golden Atom (1922) Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 25 minutes If you’ve ever wrestled with java.util.Date and SimpleDateFormat in Groovy, you know the pain. Mutable date objects, thread-unsafe formatters, ... Read More

Groovy print vs println – All Output Methods Explained with 14 Examples

This guide covers Groovy println, print, printf, System.out, and formatted output with 14 practical examples. Complete guide to console output tested on Groovy 5.0.6. “The first thing every programmer learns is how to print. The last thing they master is knowing what to print and where.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Beginner | Reading Time: 16 minutes The groovy println statement is usually the first thing you write when learning the language, ... Read More