Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

fill array java

// fill array with counter (for loop) (1,2,3,4,5)
 int[] myArray = new int[5];
 for (int i = 0; i < myArray.length; i++) {
	 myArray[i] = i + 1;
 }
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #fill #array #java
ADD COMMENT
Topic
Name
5+7 =