在Java中等待函数 [英] Wait function in Java
本文介绍了在Java中等待函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我正在编写一个Java代码来表示堆排序并表示我需要一个等待函数的操作,该函数将在不同的操作之间等待,但我不确定Java中是否有一个函数可以执行此操作或执行此操作我需要自己编写这个函数,我该怎么做。
So I am writing a Java code to represent a heap sort and to represent the operation I need to have a waiting function which will wait between different operation but I am not sure if there is a function in Java that does that or do I need to write the function by myself and how would i do that.
代表堆运动是一个功课,但写等待功能并非如此我感谢你的帮助
Representing heap sport is a homework but writing the waiting function isn't so I appreciate your help
推荐答案
您正在寻找 Thread.sleep(int milliseconds)
You're looking for Thread.sleep(int milliseconds)
这篇关于在Java中等待函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文