mirror of
https://github.com/System-End/APCSA.git
synced 2026-04-19 22:15:15 +00:00
19 lines
575 B
Java
19 lines
575 B
Java
import java.util.Scanner;
|
|
|
|
public class runner_U6_L3_Activity_One {
|
|
|
|
public static void main(String[] args) {
|
|
Scanner scan = new Scanner(System.in);
|
|
System.out.println("Enter array length:");
|
|
int len = scan.nextInt();
|
|
scan.nextLine();
|
|
String[] wordList = new String[len];
|
|
System.out.println("Enter values:");
|
|
for (int i = 0; i < len; i++) {
|
|
wordList[i] = scan.nextLine();
|
|
}
|
|
System.out.println(
|
|
"Shortest word: " + U6_L3_Activity_One.findShortest(wordList)
|
|
);
|
|
}
|
|
}
|