Replace (????) with relevant code for the program to function. Details about the programs are provided below. (Jav has been used). Show the output. a)This program prints four lines: kimarr() 4 [9, 0, 0, 14] 2 [9, 0, 0, 14] kimarr() 8 [9, 9, 14, 14] 4 [9, 9, 14, 14] */
Replace (????) with relevant code for the program to function. Details about the programs are provided below. (Jav has been used). Show the output.
a)This program prints four lines:
kimarr() 4 [9, 0, 0, 14]
2 [9, 0, 0, 14]
kimarr() 8 [9, 9, 14, 14]
4 [9, 9, 14, 14]
*/
package finalexamtakehome2;
import java.util.*; // for Arrays class
/**
*
* @author sweetkim
*/
public class Finalexamtakehome2 {
//
public static void kimarr(int x, int[] a) {
x = x * 2;
if (x > 6) {
a[2] = 4;
a[1] = 9;
} else {
a[0] = 9;
a[3] = 1;
}
System.out.println("kimarr() " + x + " " + Arrays.toString(????));
}
//
public static void main(String[] args) {
int x = 1;
int[] a = new int[4];
x = x * ????;
kimarr(x, a);
System.out.println(x + " " + Arrays.toString(????));
x = x * 2;
kimarr(x, a);
System.out.println(x + " " + Arrays.toString(????));
}
}
/*
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)