Java Program to print the number of elements present in an arrayIn this program, we need to count and print the number of elements present in the array. The number of elements present in the array can be found by calculating the length of the array. Length of above array is 5. Hence, the number of elements present in the array is 5. Algorithm
Program:Output: Number of elements present in given array: 5 Next TopicJava Programs |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India