Problème avec ArrayList <String>
Bonjour à tous,
Je viens de m'inscrire sur ce forum !!
Depuis la version JRE/JDK 1.5.06, j'ai un petit souci concernant la compilation de mes classes.
En effet, avant le système acceptait avant :
Exemple :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| private ArrayList finalArray;
public ArrayList selectWebInputData () throws SQLException , Exception
{
finalArray = new ArrayList <String> () ;
//......code
try
{
while(res.next())
{
ArrayList tmp=new ArrayList ();
tmp.add(res.getString(1)) ;
//...... code
finalArray.add(tmp) ; |
Pour une compilation sans errures, je suis obligé de faire :
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| private ArrayList <String> finalArray;
public ArrayList selectWebInputData () throws SQLException , Exception
{
finalArray = new ArrayList <String> () ;
try
{
while(res.next())
{
ArrayList tmp=new ArrayList <String> ();
tmp.add(res.getString(1)) ;
finalArray.add(tmp) ; |
Mais une erreur survient avec : finalArray.add(tmp) ;
Pourrait-on me donner la syntaxe concernant cette derniere erreur ?
Merci de votre prompte réponse.
Bye.