0

how to access inner class array of objects using outer class array of object?

i have created an outer class and inner class and created array of objects for both, but can't access inner objects arrays with relevant outer class object please check code for details https://code.sololearn.com/c54DCiWJl4iH/?ref=app

1st Oct 2022, 4:39 AM
Arun Ruban SJ
Arun Ruban SJ - avatar
4 Antworten
+ 2
It will be better to change names for better reading of code. More information for accesing inner class you can see heere: https://www.w3schools.com/java/java_inner_classes.asp
1st Oct 2022, 5:27 AM
JaScript
JaScript - avatar
+ 1
You are replacing o[0] by o[1] by second loop.. Take a look at again.. it answers.
1st Oct 2022, 11:20 AM
Jayakrishna 🇮🇳
0
Jayakrishna🇮🇳 i want to create 100 arrays, 10 for each outer objects o[0], o[1],...upto o[9] using the inner objects and access each with different outer objects, is that possible??
2nd Oct 2022, 4:38 AM
Arun Ruban SJ
Arun Ruban SJ - avatar
0
Arun Ruban SJ Sry, I don't understand your problem.. First you can try with single variable then apply to array..
4th Oct 2022, 11:03 AM
Jayakrishna 🇮🇳