how to find length of integer array in java code example
Example 1: find length of array java
Int[] array = {1,2,3};
int lengthOfArray = array.length;
System.out.println(String.valueOf(lengthOfArray));
Example 2: how to find length of array in java
let coolCars = ['ford', 'chevy'];
let length = coolCars.length;
Example 3: How to find the length of an array in java
class Main {
public static void main(String[] args) {
String[] x = new String[]{"This", "Should", "return", "4"};
System.out.println(x.length);
}
}
Example 4: java get size of array
arrayname.length