- 1

what these brackets do here like string[ ]

30th Jul 2018, 6:47 AM
Aquib Ahmed
Aquib Ahmed - avatar
4 Réponses
0
Square brackets indicate that you're dealing (in this example) with an array of strings, and not just one
30th Jul 2018, 6:55 AM
voidneo
0
can u please describe a little
30th Jul 2018, 6:57 AM
Aquib Ahmed
Aquib Ahmed - avatar
0
Take a look at this example https://code.sololearn.com/ceAp5M6W4Ht7/?ref=app str is a variable type String, stores only one string strArr is an array, set or group of String variables. That's what brackets indicate. Brackets are also used to access a string from the array, using its position starting from zero. For example: strArr[1] returns the second string. Everything is explained in.the course, follow it
30th Jul 2018, 7:06 AM
voidneo
0
thanx
30th Jul 2018, 7:16 AM
Aquib Ahmed
Aquib Ahmed - avatar