Java – enums | lookup enum by value

  Overview This article explains how Java enums work and different ways to lookup Enums based on their values. It also explains the performance of different approaches of java enum reverse lookup and performance of valueof method.  Java Enums Enums were introduced as part of JDK5 version to enable programmers to create a set of constants with below

Java – Convert int to String and vice versa

Overview This document describes different ways to convert different number data types to String and vice versa. Integer to String (Integer –> String) Primitive type int can be converted to String using either of following methods –  String str = String.valueOf(7); String str = Integer.toString(7); String str = “”+i;   Integer object can be directly converted

Java – How to generate random numbers

Overview This article describes how to generate random numbers in Java. There are multiple ways available to generate random numbers and based on the needs either one can be used. Method 1 – Using Java’s Random One of the simplest ways is to use java.lang.Math.random() method. It generates double rangingĀ from equals to or greater than

About Us

Techoneness is a site containing tutorials, documents, articles related to Java technologies. You can reach out to below email for any suggestions/comments- Email –