Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Seminar1;
- import java.util.Arrays;
- import java.util.Scanner;
- public class Upr3 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String[] names = new String[5];
- System.out.println("Enter a name: ");
- for (int i = 0; i < names.length; i++){
- names[i] = scanner.nextLine();
- }
- System.out.println(Arrays.toString(names));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement