304311 Java Lab 

 Lab 4

Objective

To introduce arrays

Classwork:

  1. Write an application that declares an array of 5 strings. Write function getData that asks the user to enter the elements of the array, and function concatenate that concatenates the values of the array. The result should be displayed in a text area.

    1.     Write an applet that declares array1 and array2 of integers of size 10 then:

            Initialize the elements of array1 to 4.

            Asks the user to enter the elements of array2.

            Check if both arrays are equals.

            Copy the elements of array2 to array1.

            Sort array1.

            Search for the value 7 in array1.

      (Hint: Use methods provided by Arrays class)

Lab 1
Lab 2
Lab 3
Lab 4
Lab 5
Lab 6
Lab 7
Lab 8
Lab 9

 � All Copyright Reserved By Fatma & Tahany,Email : [email protected]

Hosted by www.Geocities.ws

1