-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskList.java
33 lines (29 loc) · 998 Bytes
/
TaskList.java
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
import java.io.File;
import java.io.IOException;
import java.util.Scanner;
import java.util.ArrayList;
public class TaskList{
static public ArrayList<String> taskList;
static public void showTask() {
taskList=new ArrayList<>();
Scanner sc;
String sourcefilepath="C:\\Users\\NAGA BABU SIGA\\OneDrive\\Desktop\\assignment_test_txt.txt";
String namedt="";String dest="";String duet="";String stat="";
try{
sc=new Scanner(new File(sourcefilepath));
sc.useDelimiter("[,\n]");
while(sc.hasNext()){
namedt=sc.next();
dest=sc.next();
duet=sc.next();
stat=sc.next();
taskList.add(namedt);
System.out.println(dest+" "+duet+" "+stat);
}
sc.close();
}
catch(IOException e){
System.out.println("There is an io exception!");
}
}
}