PDA

View Full Version : [Java]come creare una lista di elementi


TeX-mAn
15-05-2008, 17:27
Devo convertire un programma dal C in Java.Nel programma ho una lista di studenti.In C creo una lista tramite puntatori.In java come faccio visto che non esiste l'aritmetica dei puntatori?:cry: Ho creato una classe Studente con tutte le sue caratteristiche e comportamenti.Ora non riesco a capire come collegare i vari Studenti tra di loro per poter creare un archivio.
Grazie

banryu79
15-05-2008, 17:49
Usa la classe java.util.ArrayList.

Fa parte delle Collection, vedi qui (http://prog.dsi.unimi.it/laboratorio/lezioni/lez10.pdf)

Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.