The following exercises are based on those from the lecture notes. Please refer to the lecture notes for any
information required and then carry out the following exercises plus any additional tasks as described. You will need
to create Java classes based on those in the lecture notes, or create your own, as appropriate.
1. Create a file arrayslist, and place the Java code that solves each of the following problems within it.
(a) Write a Java program that declares and initialises three arrays A, B and C all of length five. A and B are of
type int and C is of type String.
(b) Create an int array called D of length five.
(c) Populate the array of Strings C (question 1) with words of your choice, use a for loop to print out every
element of the array C.
(d) Modify your for loop code so that it loops through every element in the array C and at the end tells you
which of the words in C has the longest length.