/* package whatever; // don't place package name! */
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.*;


public class UserData {
	private String UserTimestamp;
	private String UserName;
	private String UserURL;
	private String UserTimeOnPage;
	
	public void show (){
		System.out.println(UserTimestamp+" "+UserName+" "+UserURL+" "+UserTimeOnPage);
	}
	public boolean compare(UserData dd){
		
		return true;
	}
	UserData(String UT, String UN, String UU, String UTOP){

		UserTimestamp=UT;
		UserName=UN;
		UserURL=UU;
		UserTimeOnPage=UTOP;
	}
}

public class User {

	  public static void main(String[] args) {
	 
		User obj = new User();
		obj.getData();
	 
	  }
	 
	  public void getData() {
	 
		String csvFile = "D:\\JAVA\\Сорц Джвава\\Input\\file1.csv";
		BufferedReader br = null;
		String line ="";
		String cvsSplitBy = ",";
		//Map staff=new HashMap<String, UserData>();
		ArrayList<UserData> list = new ArrayList<UserData>();
		int i=0;
		try {
	 
			br = new BufferedReader(new FileReader(csvFile));
			while ((line = br.readLine()) != null) {
	
			        // use comma as separator
				String[] country=line.split(cvsSplitBy);
				UserData ff=new UserData(country[0], country[1], country[2], country[3]);
				list.add(i,ff);
				i++;
	 
			}
			for(int j=0; j<5; j++){
				list.get(j);
			}
			UserData dd=list.get(0);
			dd.show();
	 
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (br != null) {
				try {
					br.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
	 
		System.out.println("Done");
	  }
	 
	}