-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTicketDesk.java
More file actions
44 lines (32 loc) · 1.22 KB
/
Copy pathTicketDesk.java
File metadata and controls
44 lines (32 loc) · 1.22 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
import java.util.Scanner;
public class TicketDesk {
public static void main(String[] args) throws InterruptedException {
//Declaration
Scanner scanner = new Scanner(System.in);
//variables to store customers Ticket in
String[] ticket = new String[5];
ticket[0]= "This is the 1st ticket";
ticket[1]= "This is the 2nd ticket";
ticket[2]= "This is the 3rd ticket";
ticket[3]= "This is the 4th ticket";
ticket[4]= "This is the 5th ticket";
System.out.println(ticket[0]);
System.out.println(ticket[1]);
System.out.println(ticket[2]);
System.out.println(ticket[3]);
System.out.println(ticket[4]);
//updated for the both of 1 and 2 tickets updates
ticket[0]= "This the UPDATED ticket 1st";
System.out.println(ticket[0]);
ticket[1]= "This the UPDATED ticket 2nd";
System.out.println(ticket[1]);
//Delete ticket 4
ticket[3]= " ";
System.out.println(ticket[3]);
System.out.println(ticket[0]);
System.out.println(ticket[1]);
System.out.println(ticket[2]);
System.out.println(ticket[3]);
System.out.println(ticket[4]);
}
}