Write a Java program that declares an array alpha of 50elements. Initialize the array so that the first 25 elements areequal to the square of the index variable and the last 25 elementsare equal to three times the index variable. Output the array sothat 10 elements per line are printed.