ArrayList Example

package collectiondemo;
import java.util.Arrays;
public class ArraySort {
	public static void main(String[] args) 
	{
		int[] a = new int[10];
		for (int i = 0; i < a.length; i++) 
		{
		a[i] = (int) (Math.random() * 100);
		}
		Arrays.sort(a);
		System.out.println("Sorted array!");
		for (int i = 0; i < a.length; i++)
			System.out.println(a[i]);
	}
}

Download

Collections in Java

ArrayList Example
HashMap Example
HashTable Example
Array Sort
Read Properties File
Get System Properties


Write your Comment

Name :
Email Id : [ We will not publish your email id ]
Your Comment : [ Maximum 200 chars ]
Enter Security code