forked from vabburi82/Java8Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomer1.java
More file actions
37 lines (29 loc) · 1.05 KB
/
Customer1.java
File metadata and controls
37 lines (29 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package example1;
import java.util.Scanner;
public class Customer1
{
public static void main(String[] args)
{
int i;
// @SuppressWarnings("resource")
Scanner input = new Scanner(System.in);
System.out.print("\nDo you want enter more customers : ");
String moreCustomers = input.next();
for (i = 1; "Y".equalsIgnoreCase(moreCustomers); i++)
{
System.out.println("\nEnter Customer [ " + ( i) + " ] details ::");
System.out.print("Enter the name: ");
String name = input.next();
System.out.print("Enter the Email: ");
String email = input.next();
System.out.print("Enter the PhoneNo: ");
String phone = input.next();
System.out.println("\nDo you want enter more customers : ");
moreCustomers = input.next();
System.out.println("User Details Entered are ::\n");
System.out.println("User Name :: "+ name);
System.out.println("User Phone :: "+ email);
System.out.println("User Email :: "+ phone);
}
}
}