exception java nullpointer
Bonjour
je developpe une app ,bon je vais stocker liste des noms dans un tableau des strings à partir d'une méthode
voila mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
// Read Plist content
String xml = readPlistFromAssets();
// create object of Parser Class
ParsePlist pp = new ParsePlist();
// parse Plist and fill in plist array
ArrayList<DataModel> plist = pp.parsePlist(xml);
// Print ArrayList
Iterator<DataModel> i = plist.iterator();
for( int j=0; j<10; ++j) {
while(i.hasNext()){
DataModel d = i.next();
nom[j]= d.getDrawName();
}
} |
l'erreur est dans cette ligne : nom[j]= d.getDrawName();