I'm having problems with ArrayList
import java.util.Scanner;
public class ArrayList{
public static void main(String[] args) {
ArrayList<ArrayList> agenda = new ArrayList<ArreyList>();
Scanner input = new Scanner(System.in);
agenda.add("Teste");
System.out.println(agenda);
}
}
Whenever I compile it gives the error
ArrayList.java:1: error: ArrayList is already defined in this compilation unit import java.util.ArrayList;
and about the ArrayList of
ArrayList.java:5: error: type ArrayList does not take parameters ArrayList schedule = new ArrayList ();
It says that the ArrayList does not receive parameters but still taking out the parameters it does not compile, it shows as if the .add function is not known ArrayList.java:7: error: can not find symbol agenda.add ("Test");