• Post Reply Bookmark Topic Watch Topic
  • New Topic

making a console program pause  RSS feed

 
Ranch Hand
Posts: 291
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,

just want to make my console pause 1 second before clearing the screen

i googled around and found

Thread.sleep (1000);

but this doesnt seem to be working,is there something that needs to be imported?

any ideas?

 
jon ninpoja
Ranch Hand
Posts: 291
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok got it sorted with:

 
Bartender
Posts: 1603
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the benefit of others that may encounter the same issue, please share what problem you found and how you resolved it.
 
jon ninpoja
Ranch Hand
Posts: 291
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sure!!!...will do in future

i was making a silly enter password program that then takes you to a menu after putting the correct password in.
after entering the password it cleared the screen immediately without displaying "password correct"

so i had the password correct display for a second or two before clearing the console

i found somebody was doing the same thing in a google search and suggested i entered this code above
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!