How to calculate date/time difference in Java

  • 16 January 2017
  • ADM

How to calculate the date and time difference in Java using a simple method of division and remainder of division.


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 read XML file in Java using DOM

  • 12 July 2016
  • ADM

How to read XML file in Java using DOM. 2 methods: one reading each element by the name and second parsing the entire DOMobject.


How to read CSV file in Java

  • 27 May 2016
  • ADM

How to parse CSV file in Java and display all the value.The solution treats the case when a column contains the delimiter and the double quote character.


How to read and write JSON with json-simple

  • 21 April 2016
  • ADM

How to read and write JSON with json-simple library. Full example how to create an object, write it to a file, read it and use it.


How to parse Google Search result in Java

  • 26 May 2017
  • ADM

How to parse Google Search result in Java using URLConnection and a regular expression to parse the response. Can be used to check the Google SERP position.