What exactly does "initialization of arrays" mean? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

What exactly does "initialization of arrays" mean?

17th Oct 2020, 4:29 AM
Bharadwaaja Kanakadandi
Bharadwaaja Kanakadandi - avatar
5 Respostas
+ 6
int[] someArray = new int[4]; int[] someArray = new int[4] {1,2,3,4}; int[] someArray = new int[] {1,2,3,4}; int[] someArray = {1,2,3,4};
17th Oct 2020, 4:44 AM
Orchiiik
Orchiiik - avatar
+ 4
The process of assigning values to theĀ arrayĀ elements is calledĀ array initialization.Ā 
17th Oct 2020, 5:51 AM
Sanidhya Varshney
+ 3
If you have an int array, the initialization of it is: int arr[] = {1, 3, 2, 29};
17th Oct 2020, 4:32 AM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar
+ 1
Martin Taylor I don't know he use c++ I only tells that the declaration done by Amanbek Orynbay is correct
17th Oct 2020, 10:27 AM
Sanidhya Varshney
0
Answer by Amanbek Orynbay is correct because we use this type of declaration in Java
17th Oct 2020, 5:52 AM
Sanidhya Varshney