Createa class named ArrayClass .The class will have: · Fields: -an int named siz
ID: 3616541 • Letter: C
Question
Createa class named ArrayClass.The class will have:
· Fields:
-an int named sizeOfArray
-An int named theArray
· No-argConstructor that assigns 0 to sizeOfArray and to each element oftheArray
· ParameterConstructor that accepts an int and an int array
· CopyConstructor that accepts an object of the classArrayApplication
· MethodbubbleSortArray has no argument. the method will sort the theArrayand return the time of sorting process by using methodSystem.nanoTime(); that returns a long number.
· MethodselectionSortArray has no argument. The method will sort thetheArray and return the time of sorting process (as above)
· methodtoString will print out the array elements.
For example: theArray = { 4, 8, 16, 77, 2, 57, 80 }
Output should be:
Array: 4 8 16 77 2 57 80