阅读背景:

如何使打印语句的输出延迟显示一秒?

来源:互联网 

So here I just have a simple Java program that calculates the numbers of the Fibonacci sequence. It works well. There are no bugs. The program asks the user how many numbers of the Fibonacci sequence the user wants to see. The only noticeable "issue" here is that the numbers are almost spontaneously calculated and displayed. If the user asks for a very large amount of numbers, they are all displayed. Then the user has to scroll up to read them all from the beginning. I think that it would be good to delay the println statements that display the numbers for a second for readability. The user would have an opportunity to read each number one at a time! What would be the professional way to achieve this effect? I need a statement that causes the program to wait for a little bit after each number is displayed. What should I add to my code? Here is my code:So here I just have a simple Java program that




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: