Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class UserInput
- {
- Scanner keyboard = new Scanner(System.in);
- System.out.println("Enter the Number of Items You want to add");
- int x = keyboard.next();
- int y = x-1;
- String [] name = new String [y];
- double [] hour = new double [y];
- char [] type = new char [y];
- for (int i=0; i<y; i++)
- {
- System.out.println("Enter The Name");
- name[i]= keyboard.next;
- System.out.println("Enter The Hour");
- hour[i]= keyboard.next;
- System.out.println("Enter The Type");
- type[i]= keyboard.next;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement