Java Output Delay | SoloLearn: Learn to code for FREE!


Java Output Delay

I have been trying to delay the output in my code but it just shows Time Out and keeps exiting. Do i need to import any package? Are there any other method which carries out the same function? Btw may i know which java version is in this application? THANKS!! Here's my code - try{ System.out.println("Output is "); Thread.sleep(4000); } catch (Exception e) { //nothing }

4/21/2020 5:59:26 PM

Big Billy Boy

5 Answers

New Answer


using a value of 2000 gets a timeout, but a value of 1500 works. The system probably has a 2 second execution limit to limit system overload, endless loops, etc.


I think in Sololearn, thread sleep don't works....


So is there any way in which i can delay the output?


On Sololearn you have only 5 seconds before time out.


Chris Persichetti Maybe they reduced the time limit. Connection issues plays also a role.