Substring Java Example
In this example we will show how to use Java String substring() API method. 1. Syntax substring() method can be expressed in two ways: String substring(int start, int end) String substring(int start)...
View ArticleJava String to Double Example
String to Double conversion is a frequent procedure because both data types are commonly used. As you can imagine in this example we are going to show all the possible ways of converting String object...
View ArticleJava string to long Example
Long class forms the primitive type long, which can represent an integer number of 32 bits (2^32). A very common procedure in Java programming is the conversion of String to Long. As you can expect, in...
View ArticleJava String to Float Example
float is a frequently used data type of 32-bit and it represents decimal numbers. The main difference from double is that it requires smaller size in memory but in some situations (big numbers) doesn’t...
View ArticleJava String to char Example
String to char conversion is a very simple procedure in Java. This process is useful when we want to use char format instead of strings in our applications, for instance in the arguments in command...
View ArticleJava String to Date Example
Java gives us the capability to convert String to Date. This can be done through DateFormat and SimpleDateFormat classes, where the last class is a subclass of the first one. It is worth to mention...
View Article