0

Hey guys please anybody tell why this while loop not works on sololearn app but it works on other apps like javanide??

https://code.sololearn.com/cOJRztWo5i4T/?ref=app

31st Mar 2022, 2:17 PM
RAGHUKUMAR SURA
RAGHUKUMAR SURA - avatar
2 Respostas
+ 2
It works but It's an infinite loop. Sololearn playground is not interactive. on no input, it raise exception. edit: RAGHUKUMAR SURA instead of while(true), use while(sc.hasNext()). then it works fine. hope it helps..
31st Mar 2022, 2:21 PM
Jayakrishna 🇮🇳