This program asks the user to input a number and then brings back the details from an list. how do I do this?
do {
Scanner in = new Scanner(System.in);
System.out.println("Enter Number <terminated by 1>");
} while (!input.equals("-1"));
System.out.println("Session Over");
} catch (Exception e) {
System.out.println(e);
}
}
}
output:
Enter Number <terminated by 1>
123456
Person Number: 12