See below for the modified program in Java
<h3>How to modify the program?</h3>
The for loop statements in the program are:
- for (int i = 0; i < arr.length; i++) { arr[i] = rd.nextInt(1000); }
- for (int i = 0; i < arr.length; i++) { System.out.println(arr[i]); }
To use the enhanced for loop, we make use of the for each statement.
This syntax of the enhanced for loop is:
for(int elem : elems)
Where elem is an integer variable and elems is an array or arrayList
So, we have the following modifications:
- i = 0; for (int num : arr){ arr[i] = rd.nextInt(1000); i++;}
- for (int num : arr) { System.out.println(num); }
Hence, the modified program in Java is:
class Main {
static int[] createRandomArray(int nrElements) {
Random rd = new Random();
int[] arr = new int[nrElements];
int i = 0;
for (int num : arr){
arr[i] = rd.nextInt(1000);
i++;
}
return arr;
}
static void printArray(int[] arr) {
for (int num : arr) {
System.out.println(num);
}
}
}
public static void main(String[] args) {
int[] arr = createRandomArray(5);
printArray(arr);
}
}
Read more about enhanced for loop at:
brainly.com/question/14555679
#SPJ1
Answer:
data, labels and formulas
Answer:
1 2 and 3 (A) give me brainiest

Explanation:
When the algorithm takes more than one decision before carrying out a task
<span>The answer is SQL Injection
</span>
This kind of attack is the most prone to extract privacy data elements out of a database. An SQL injection like any other attack may take several attempts to pull
it off and is more likely to extract private data. With admin rights or
escalated priviledges, SQL injections can be used to enter the database.