Java 8 forEach examples

  • 07 February 2017
  • ADM

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


GET/POST request with Apache HttpClient

  • 27 January 2017
  • ADM

GET/POST request tutorial using Apache HttpClient. The tutorial is using httpbin.org test server.


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 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.