forked from vabburi82/Java8Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDetails.java
More file actions
52 lines (40 loc) · 1.35 KB
/
Details.java
File metadata and controls
52 lines (40 loc) · 1.35 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package example1;
import java.util.Scanner;
public class Details {
public static void main(String[] args)
{
int i;
String name;
String email;
String phone;
Scanner input =new Scanner(System.in);
System.out.println("Welcome to Costumer Deatails page");
Customer names[]=new Customer[1000];
System.out.println("Are you creating a record:");
String userReply=input.next();
for (i = 0; "Y".equalsIgnoreCase(userReply); i++)
{
System.out.println("\nEnter Customer [ " + ( i) + " ] details ::");
System.out.print("Enter the name: ");
name = input.next();
System.out.print("Enter the Email: ");
email = input.next();
System.out.print("Enter the PhoneNo: ");
phone = input.next();
System.out.println("\nDo you want to enter more customers : ");
userReply=input.next();
names[i]=new Customer();
names[i].name=name;
names[i].email=email;
names[i].phone=phone;
}
System.out.println("\nUser Details Entered are ::\n");
for(int j=0;j<i;j++)
{
System.out.println("User Name ::" + names[j].name);
System.out.println("User Phone :: "+names[j].phone);
System.out.println("User Email :: "+ names[j].email);
System.out.println("================================");
}
}
}