import java.sql.Connection; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) { List employees = new ArrayList<>(); Database database = new Database(); database.insertEmployee("Cseviczki Zsolt", "Szolnok", 3450000); employees = database.getEmployees(); for(Employee employee: employees) { System.out.println(employee.name); } } }