allora per vedere gli errori ho scritto -Xlint e in output:
può dipendere dalla lista?codice:.\Enoteca.java:7: warning: [rawtypes] found raw type: LinkedList LinkedList lista; // = new LinkedList(); ^ missing type arguments for generic class LinkedList<E> where E is a type-variable: E extends Object declared in class LinkedList .\Enoteca.java:11: warning: [rawtypes] found raw type: LinkedList lista = new LinkedList(); ^ missing type arguments for generic class LinkedList<E> where E is a type-variable: E extends Object declared in class LinkedList .\Enoteca.java:35: warning: [unchecked] unchecked call to add(E) a the raw type LinkedList lista.add(new Vini(nome, annata, prezzo, num_bott)); ^ where E is a type-variable: E extends Object declared in class LinkedList .\Enoteca.java:50: warning: [rawtypes] found raw type: Iterator Iterator i = lista.iterator(); ^ missing type arguments for generic class Iterator<E> where E is a type-variable: E extends Object declared in interface Iterator .\Enoteca.java:65: warning: [rawtypes] found raw type: Iterator Iterator i = lista.iterator(); ^ missing type arguments for generic class Iterator<E> where E is a type-variable: E extends Object declared in interface Iterator .\Enoteca.java:85: warning: [rawtypes] found raw type: Iterator Iterator i = lista.iterator(); ^ missing type arguments for generic class Iterator<E> where E is a type-variable: E extends Object declared in interface Iterator .\Enoteca.java:100: warning: [rawtypes] found raw type: Iterator Iterator it = lista.iterator(); ^ missing type arguments for generic class Iterator<E> where E is a type-variable: E extends Object declared in interface Iterator 7 warnings

Rispondi quotando