Series: Array special

Operations involving arrays

Removing Duplicates Array Java

Removing Duplicates Array Java Summary: Java is so developed by Designers to write code easily for Developers. Forget the laborious days of C/C++ coding. This tutorial "Removing Duplicates Array Java" is the place to prove it. It is a general and interesting code for beginners and this can be achieved in many ways in Java. …

Removing Duplicates Array Java Read More »

Static String Static String Array

Static String Static String Array Summary: By the end of this tutorial "Static String Static String Array", you will come to know creation of static string and static string array. Like static variables, static strings and static string arrays are also common in Java coding. The same rules of static variables are followed. The following …

Static String Static String Array Read More »

Char array Byte array to String

Very often, as code demands, the array elements may be required to convert into string, especially, char arrays and byte arrays. For conversion, the string constructors and methods like copyValueOf() method is used. Following program illustrates the Char array Byte array to String. public class StringArrayManipulations { public static void main(String args[]) { char letters[] …

Char array Byte array to String Read More »

Java Convert Array to ArrayList

Java Convert Array ArrayList Summary: It is quiet common in Java coding to convert array to array list and vice versa. 4 styles are given in simple terms, examples in this tutorial "Java Convert Array ArrayList". Following are the methods signature used Java Convert Array ArrayList. 1. Defined in Array class static List asList(T array): …

Java Convert Array to ArrayList Read More »

Java ArrayList to Array

Java ArrayList to Array Summary: After seeing the 4 styles of converting array elements into array list, now let us do the opposite way of converting "Java ArrayList to Array". Note: There are two methods, asList() and toArray(), that bridges collection classes (data structures) and array. These methods are defined in Arrays class and Collection …

Java ArrayList to Array Read More »

Java Array vs ArrayList

Java Array vs ArrayList Summary: This tutorial "Java Array vs ArrayList", tables you the differences between array and arraylist at a glance to remember easily. Both array and ArrayList are well familiar and used by the programmer very often. Both are interoperable – array to arraylist and arraylist to array. Following table gives the differences …

Java Array vs ArrayList Read More »

Converting Numbers to Words

Sometimes it is very much required in coding to convert numbers to words and print them as can be seen in Railway reservation tickets. Explained in "Converting Numbers to Words" with Java syntax. Following program illustrates "Converting Numbers to Words". import java.util.*; public class YourNumberMyWord { public void pw(int n,String ch) { String one[]={” “,” …

Converting Numbers to Words Read More »