Home » Tag Archives: featured

Tag Archives: featured

Java String format Example

Last updated Jan. 14, 2019 In this post, we feature a comprehensive Java String format Example. We are going to see how to format Strings in Java. Developers familiar with C, will find the methods used here resembling printf function. And the formatting specifications are very similar. In fact, PrintStream class in Java, has a member function called printf designed ...

Read More »

Java Map Example

In this post, we feature a comprehensive Java Map Example. We will discuss about Maps in Java. A Map is an interface that maps keys to values. The keys are unique and thus, no duplicate keys are allowed. A map can provide three views, which allow the contents of the map to be viewed as a set of keys, collection ...

Read More »

ArrayList in Java Example – How to use arraylist

In this example we will show how to use ArrayList in Java. The class java.util.ArrayList provides resizable-array, which means that items can be added and removed from the list. It implements the List interface. A major question related to arraylists is about when to use arraylists instead of arrays and vice versa. An ArrayList is a dynamic data structure so ...

Read More »

Substring Java Example

In this post, we feature a comprehensive Substring Java 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)   2. Parameters start This parameter is mandatory and it specifies the starting position of the extracted string. Note that first character ...

Read More »