Integer array with some length

studio

#1

iam getting an index out of range exception . how to set the length to the integer array.


#2

Hi,

you can have it as like this,

array(2) As Integer - In a variable declaration with default value as “New Integer(10){}”
array(0) = 100 - Assign Activity
array(1) = 10 - Assign Activity
array(2) = 1 - Assign Activity


#3

hi ,


like this iam getting like this


#4

Hey @akshaygm12

Write there New Integer(10){} this will set your array length upto index 10,ie, 11 elements!