/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author nicolaedarie */ import java.io.File; import java.io.FileNotFoundException; import java.util.*; class Student { String nume,prenume; int grupa; float medie; Student(String nume, String prenume, int grupa,float medie){ this.nume = nume; this.prenume = prenume; this.medie = medie; this.grupa = grupa; } String getNume() { return this.nume; } String getPrenume() { return this.prenume; } float getMedie() { return this.medie; } int getGrupa() { return this.grupa; } } interface Lista { void adauga(T info); void sterge(T info); //T elementAt(int i); } class ListaStudenti implements Lista { List lista = new List; ListaStudenti() { } public void adauga(Student s) { } public void sterge(Student s) { } } public class Studenti { public static void main(String[] args) throws FileNotFoundException { String s; String st[]; java.util.Scanner sc =new java.util.Scanner(new File("studenti.csv")); while (sc.hasNextLine()){ s = sc.nextLine(); st= s.split(";"); System.out.println(st[0]+" "+st[1]+" "+st[2]+" "+st[3]); Student student = new Student(st[0],st[1],Integer.parseInt(st[2]),Float.valueOf(st[3]).floatValue()); } } }