+ 2
Exception in thread "main" java.lang.NullPointerException at Merit.main(Student.java:42)
Hello I'm trying to solve this problem but I couldn't find any solution here I'm writting the code : https://code.sololearn.com/c5R83jup51lh Don't run it on sololearn playground. Run it on desktop u will be directed what to input.
6 ответов
+ 4
I found the error I haven't initialized array object properly therefore Memory was not allocated and it was returning null pointer exception one silly mistake eats hours and hours!☺
+ 2
I always recommend to use only one scanner per method. And then call next () twice.
+ 1
Could you please show your code in playground? It's difficult to find mistakes and the right line.
+ 1
What am I supposed to input?
0
I have no chance to run it on desktop, sorry.
0
Good😂