Question: Enhanced for Loop Write an enhanced for loop that takes a given Array called words and prints each element to the console. import java.io .
Enhanced for Loop
Write an enhanced for loop that takes a given Array called words and prints each element to the console.
import java.io;
import java.util.;
import java.text.;
import java.math.;
import java.util.regex.;
public class EnhancedForLoopQuestion
public static void mainString args
Scanner in new ScannerSystemin;
String a innextLine;
String b innextLine;
String c innextLine;
String d innextLine;
String e innextLine;
String words a b c d e;
DO NOT CHANGE THE CODE ABOVE THIS LINE
WRITE YOUR CODE HERE
STDOUT
Expected STDOUT
Bird
Cat
Dog
Lizard
Fish
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
