How to check the JDK version of a class file

  • 17 March 2020
  • ADM

When running a Java application it is mandatory that the JRE version to match or to be higher that the JDK version used to compile the application.

You will get the "Unsupported major.minor version 52.0" error when trying to run an Java 1.8 application using a lower version of Java.


How to read CSV file in Golang

  • 23 December 2019
  • ADM

How to read CSV file in Golang using reader from encoding/csv package. For this example we took an simple example of a CSV file containing three columns name, address and phone.


How to write CSV file in Golang

  • 21 December 2019
  • ADM

How to write CSV file in Golang using writer from encoding/csv package. For this example we took an simple example of a CSV file containing three columns name, address and phone.


How to measure execution time in Golang

  • 19 December 2019
  • ADM

To mesure the time used by an application in Golang or of a code section the functions time.Now() and time.Since() can be used.


How to generate a random int in Golang

  • 27 September 2019
  • ADM

In Golang there a are two libraries for generating random integers, one is a pseudo-random number generator (package math/rand) and the second one is cryptographically secure random number generator (package crypto/rand)


How to trim whitespace from string in Golang

  • 25 September 2019
  • ADM

How to trim (remove) leading and trailing whitespace from string in Golang using the TrimSpace, Trim, TrimLeft, TrimRight methods from strings package.