log4j.properties basic examples

  • 09 February 2017
  • ADM

log4j.properties basic examples. Output to the console and to the file.


Java 8 forEach examples

  • 07 February 2017
  • ADM

Java 8 forEach examples. Map and list loop using lambda, method reference, stream and filter.


How to copy files in Java

  • 18 January 2017
  • ADM

How to copy files in Java with three examples: Classic method with streams, using FileChannel class and using Files class.


How to compare dates in Java

  • 04 February 2020
  • ADM

How to compare dates in Java using Date (compareTo, before, after, equals), Calendar(before, after, equals) and LocalDate(isBefore, isAfter, equals) classes.


How to get input from Java Console

  • 04 February 2020
  • ADM

How to get input from Java Console. Examples using System.console, Scanner and BufferedReader + InputStreamReader.


Java Properties file example

  • 07 December 2016
  • ADM

How to work with java Properties files. Properties files are key values file. The tutorial contains both read and write examples.