+ 2

It s strange to me how in Java you can mention name of array before or after barackets

28th Dec 2017, 9:13 PM
Hamed
Hamed - avatar
5 Réponses
+ 2
if you were to specify elements of the array you can mention the name before or after square barackets in the tutorial
28th Dec 2017, 9:20 PM
Hamed
Hamed - avatar
+ 1
int myarr[ ] [ ]={1,2,3},{4},,{5,6,7}; myarr[0][1]=42 i don t get this index system
28th Dec 2017, 10:49 PM
Hamed
Hamed - avatar
0
Its always the same. First comes the type, then the brackets and then the name of the array. So if you want to declare a String array named test it would be. String{} test=...
28th Dec 2017, 9:18 PM
ein siedler
ein siedler - avatar
0
You mean like test{//values} or {//values}test ?
28th Dec 2017, 9:21 PM
ein siedler
ein siedler - avatar