+ 2

Why doesn't this code work?

I just used thread in a java program but it gets terminated.Is it sololearn compiler specific? https://code.sololearn.com/cAid7057vgRk/?ref=app

29th Feb 2020, 6:24 PM
_rk
_rk - avatar
6 ответов
+ 1
SoloLearn has a kind of simplistic approach to input/output handling in console app, you have to enter all inputs upfront (not interactively) and you get the result in a single moment. And there is a limited timeframe available for program compilation + execution. So, sadly, this type of program won't work very well here. You can play with threads if you specify a really tiny sleep. https://code.sololearn.com/cjyUokHC6ADh/?ref=app
29th Feb 2020, 6:45 PM
Tibor Santa
Tibor Santa - avatar
+ 2
This code seems ok. It seems doesn’t work only in the SoloLearn console.
1st Mar 2020, 9:06 PM
Gianni
+ 2
Use online compiler it will be work
2nd Mar 2020, 6:47 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Yes, i debugged it in Visual Studio Code and it worked fine
29th Feb 2020, 6:35 PM
_yaroslavv [online_everyday]
_yaroslavv [online_everyday] - avatar
0
moov rca
29th Feb 2020, 8:25 PM
betare