Please help my with this little code:https: //code.sololearn.com/cmhXYMD0TJ6O/?ref=app . I want to declare an arr if it null. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Please help my with this little code:https: //code.sololearn.com/cmhXYMD0TJ6O/?ref=app . I want to declare an arr if it null.

26th Nov 2017, 1:51 PM
jack
jack - avatar
2 Answers
+ 10
Is this what you're expecting? 1. Don't re-declare arr inside if block 2. The last statement caused error because it was out of scope I've changed indentation a little bit for my own convenience. https://code.sololearn.com/cvl0ap14UGX8/#java
26th Nov 2017, 2:22 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 1
please can somebody help my I get crazy
26th Nov 2017, 2:05 PM
jack
jack - avatar