Tutorial archive
Browse individual tutorials and references.
9 published articles
In this post, we will be looking at different ways of converting a string object into a double value. In some of the methods listed below, we will be converting the string object into the Double
There are many ways to convert a double value into a string in Java. Double.toString() methodString.valueOf() methodUsing + operatorUsing StringBuilder or StringBuffer append() functionUsing DecimalFormat Let's look at…
Before proceeding, there are few points that we should know about While converting double to an int, the decimal values will be lost ( 3.14 would be converted 3 ).Second, whether we want to convert our
There are different ways of converting a long to an int in Java. Math.toIntExact() methodintValue() methodUsing Strings There is a reason that our list does not contain direct typecasting of long into an int because it
In this post, we will be looking at different ways of converting String to long in Java. We will first convert the String object into the Long wrapper class object in Java and but because of
In this post, we will be looking at different ways of converting String to int in Java. In most of the cases, we will convert the string Object into the Integer wrapper class object but because
There are many scenarios where we may be required to convert a long to a String. This post will discuss how we can convert a long integer to a string type in Java. Long.toString() methodString.valueOf() methodUsing
This post will look at various ways of converting an int to a String in Java. Below are some of the many ways of converting an int to a String - Integer.toString() methodString.ValueOf() methodUsing + operatorUsing
We often come up with requirements where we need to convert the list into a map. In this article, we will learn how to do it before and after Java 8. To understand this, we will