Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.
- e
- 2.
- First element: numbers[0]
- Last element: numbers[9] or numbers[numbers.length - 1]
- 3.
- int[] data = new int[5];
- data[0] = 27;
- data[1] = 51
- data[2] = 33
- data[3] = -1
- data[4] = 101
- 4.
- int[] odds = new int[22];
- for (int i = 0; i < 22; i++)
- {
- odds[i] = i * 2 - 5;
- }
- 5.
- [0, 4, 11, 0, 44, 0, 0, 2]
- 6.
- [3, 3, 0, 0, 6, 9, -0, -18 ]
- 7.
- You can't print arrrays using println and you can't compare arrays using the ==
- 8.
- a
- 9.
- int[] data = {7, -1, 13, 24, 6};
- 10.
- int[] Shaymin = new int[5]
- for(int i = 0; i < 5; i++)
- {
- int start = Shaymin[0]
- int max = 0
- if(start > max)
- {
- max = start;
- }
- }
- 11.
- public static double average(int[] a) {
- double mean = 0.0;
- for (int i = 0; i < a.length; i++) {
- mean += a[i];
- }
- return mean / a.length;
- }
Advertisement
Add Comment
Please, Sign In to add comment