1 import java.util.Scanner; 2. 3 public class Compare { 4 public static void main(String args) { final int SIZE_LIST = 4; int] keysList = new int[SIZE LIST]; int[] itemsList = new int[SIZE_LIST]; int...


I need help solving this in JAVA


1 import java.util.Scanner;<br>2.<br>3 public class Compare {<br>4<br>public static void main(String args) {<br>final int SIZE_LIST = 4;<br>int] keysList = new int[SIZE LIST];<br>int[] itemsList = new int[SIZE_LIST];<br>int i;<br>Scanner input<br>6.<br>8.<br>9.<br>10<br>= new Scanner(System.in);<br>11<br>12<br>keysList[0]<br>keysList[1]<br>keysList[2] = input.nextInt();<br>keysList[3] = input.nextInt();<br>input.nextInt();<br>input.nextInt();<br>13<br>14<br>15<br>16<br>itemsList[0] = input.nextInt(); I<br>itemsList[1] = input.nextInt();<br>itemsList[2] = input.nextInt();<br>itemsList[3] = input.nextInt();<br>17<br>18<br>19<br>20<br>!!<br>21<br>22<br>/* Your code goes here */<br>23<br>24<br>System.out.println();<br>}<br>25<br>26<br>27 }<br>

Extracted text: 1 import java.util.Scanner; 2. 3 public class Compare { 4 public static void main(String args) { final int SIZE_LIST = 4; int] keysList = new int[SIZE LIST]; int[] itemsList = new int[SIZE_LIST]; int i; Scanner input 6. 8. 9. 10 = new Scanner(System.in); 11 12 keysList[0] keysList[1] keysList[2] = input.nextInt(); keysList[3] = input.nextInt(); input.nextInt(); input.nextInt(); 13 14 15 16 itemsList[0] = input.nextInt(); I itemsList[1] = input.nextInt(); itemsList[2] = input.nextInt(); itemsList[3] = input.nextInt(); 17 18 19 20 !! 21 22 /* Your code goes here */ 23 24 System.out.println(); } 25 26 27 }
For any element in keysList with a value smaller than 40, print the corresponding value in itemsList, followed by a semicolon (no<br>spaces).<br>Ex: If the input is:<br>32 105 101 35<br>-10 20 30 40<br>the output is:<br>10;40;<br>

Extracted text: For any element in keysList with a value smaller than 40, print the corresponding value in itemsList, followed by a semicolon (no spaces). Ex: If the input is: 32 105 101 35 -10 20 30 40 the output is: 10;40;

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here