Integer array with some length

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

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

hi ,


like this iam getting like this

Hey @akshaygm12

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