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 sort objects with Comparable and Comparator in Java

  • 04 February 2017
  • ADM

How to sort objects with Comparable and Comparator in Java. Primitive array and list sorting. Java Object sorting with Comparable and Comparator.


How to make a file read only in Java

  • 26 January 2017
  • ADM

How to make a file read-only in Java. Simple example using File.setReadOnly() and File.setWritable(boolean) methods.


How to copy directory in Java

  • 21 January 2017
  • ADM

How to copy a directory and all sub-directories or files in Java. The recursive method used to traverse all the subdirectories.


How to display the content of a directory in Java

  • 20 January 2017
  • ADM

How to display the content of a directory in Java. Recursive method used to display all the sub-folders structure.