how to create an array with existing objects in java

‮:sptth‬//www.lautturi.com
how to create an array with existing objects in java
/**
 * @author lautturi.com 
 * Java example: create an array with existing objects in java
 */

import java.util.*;

public class Lautturi {

	public static void main(String[] args) {

		String[] strArray1 = {"java","python","perl","js","perl","c","go"};
		String[] strArray = new String[] {"java","python","perl","js","perl","c","go"};

		String string = strArray[3];
		
		for (String str : strArray) {
			System.out.print(str);
		}
		
	}
}
Created Time:2017-09-25 00:23:46  Author:lautturi