Hi,
I am making a java program to make a countdown timer.
User enters time,then when time is up a message is printed.
How do I print the time on the same line?
Please tell me how to go about it.
Thanks.
shubhang
0
Light Poster
Recommended Answers
Jump to Postread documentation on System.out.println()
Jump to PostJust use google. Type System.out.println() java, or you could also try Java IO. Also, an easy way to 'count' would be
// X
Thread.getThread().sleep(1000); //waits for 1 second.
//If you print out right here, you can be sure that the time is extremely close to 1 second from X
All 5 Replies
orko
36
Junior Poster
shubhang
0
Light Poster
BestJewSinceJC
700
Posting Maven
BestJewSinceJC
700
Posting Maven
stultuske
1,116
Posting Maven
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.