Uploaded by Hein Htet

Array-Exercises

advertisement
Array – Exercises
1. Write a fragment of Java code to calculate and display the sum of all
the numbers in an integer array called list.
2. Write a fragment of Java code that removes the negative sign from all
negative numbers in an integer array called list.
3. Write a fragment of Java code that displays the contents of a matrix of
integers (a two-dimensional array of integers) called matrix. The
result should be in a nice human-readable format.
4. Write a fragment of java code to find the highest integer value in the
array.
5. Write a fragment of Java code to calculate and display the sum of all
the integers in a matrix of integers called matrix.
Download