Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Wrong Following Code Segments Int Values New Int 10 Int 1 Q35537066

What is wrong with each of the following code segments?

a) int[] values = new int[10]; for (int i = 1; i <= 10; i++){ values[i] = i * i; }

b) int[] values; for (int i = 0; i < values.length; i++) {values[i] = i * i; }

Leave a Reply

Your email address will not be published. Required fields are marked *