开发者

What does indeterministic behavior means?

I saw this term used a lot in Joshua block's book effective java specialy on the item re开发者_JAVA百科lated to the method clone , so can some explain what does it means and examples of it ?

Thanks.


Indeterministic, or usually non-deterministic, system is a system that is not deterministic. Deterministic is described in Wikipedia as:

In mathematics [and computer science], a deterministic system is a system in which no randomness is involved in the development of future states of the system. A deterministic model will thus always produce the same output from a given starting condition or initial state.

In other words, non-deterministic system is one where there is no guarantee same input will always produce same output.


indeterministic means literally you cannot determine what the outcome will be.

Thread safety bugs are the most common example of indeterministic behaviour.

http://www.google.com/search?q=thread+safety+examples ~ 4M results.


Practically, non-deterministic means that when you run a program multiple times with the same inputs, the outputs may differ.

For the clone method, I don't know, I don't have the book, sorry.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜