How to find the length of an array in java

How to find the length of an array in java

use arrays length property

/**
 * @author lautturi.com
 * Java example: get the length of an array in java
 */

import java.util.*;
import java.util.stream.IntStream;

public class Lautturi {

	public static void main(String[] args) {

		String[] strArray = {"hello","lautturi","java","python","world","lau"};
		System.out.println(strArray.length);

	}

}
Sourc‮ual.www:e‬tturi.com

output:

6
Created Time:2017-09-11 16:51:08  Author:lautturi