How to generate random numbers in a range using Java

  • 19 July 2017
  • ADM

How to generate random numbers in a range using Java. A simple method using SecureRandom, class.


How to create a Java project with Maven

  • 07 August 2017
  • ADM

How to create a Java project with Maven. Simple steps to generate the project, import in Eclipse and run the application.


6 methods how to loop a Map in Java

  • 15 June 2017
  • ADM

How to loop a Map in Java. 6 different methods to loop through a map. The main difference is the looping method.


How to sort TreeMap in descending order in Java

  • 15 June 2017
  • ADM

How to sort TreeMap in descending order in Java. A simple example using a string as keys.


Thread Semaphore and Mutex in Java

  • 30 May 2017
  • ADM

Thread Semaphore and Mutex in Java. Semaphore restrict the access to a resource for limited numbers of threads while mutex restricts the access to a single thread.


Enum examples in Java

  • 24 April 2017
  • ADM

Enum examples in Java. Simple enum usage. How to convert String to Enum object. Enum object with fields and methods.