write a java statement to create an array named search of size 30
Answers
Answered by
3
Answer:
For example, an array named myarray can be initialized with integers 10, 20 and 30 by three methods.
Method 1. int[] myarray = new int[]{10, 20, 30};
Method 2. int[] myarray = {10, 20, 30};
Method 3. int[] myarray = new int[3]; myarray[0] = 10; myarray[1] = 20; myarray[2] = 30;
Similar questions