有缺陷的java程序 [英] faulty java program

查看:63
本文介绍了有缺陷的java程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

java中错误的程序意味着什么?我被告知数字程序的计算有任何错误。真的很感激,如果有人可以举一些例子来澄清这个话题。

在此先感谢

What''s that mean by faulty program in java? I am told that it is any wrong in calculation for numerical program. Really appreciate if someone could give examples here to clarify about this topic.
Thanks in advance

推荐答案


错误的程序是什么意思java吗?我被告知数字程序的计算有任何错误。真的很感激,如果有人可以举一些例子来澄清这个话题。

提前谢谢
What''s that mean by faulty program in java? I am told that it is any wrong in calculation for numerical program. Really appreciate if someone could give examples here to clarify about this topic.
Thanks in advance



错误的程序会编译运行而不会抛出任何异常,但在某些情况下会产生错误的结果。设计用于计算数字阶乘的程序如果给0表示阶乘0,则会出错,即使它给出了其他正整数的正确结果。

A faulty program would compile and run without throwing any exceptions but would give the wrong result in some cases. A program designed to calculate the factorial of a number would be faulty if it gave say, 0 for the factorial of 0, even if it gives correct results for the other positive integers.



错误的程序会编译运行而不会抛出任何异常,但在某些情况下会产生错误的结果。设计用于计算数字的阶乘的程序如果对0的阶乘给出0则是错误的,即使它给出其他正整数的正确结果。
A faulty program would compile and run without throwing any exceptions but would give the wrong result in some cases. A program designed to calculate the factorial of a number would be faulty if it gave say, 0 for the factorial of 0, even if it gives correct results for the other positive integers.



这个怎么样:

原始程序:a> b

为了弄错,你改为b< a

运行后,我们会得到不同的结果,因此我们知道程序中存在代码错误。是这样吗..?

感谢您的解释。

好​​的,还有一个关于此问题的问题,根据您的经验,是否有任何完整的数值Java程序(开源)的例子?

所以我可以学习创建/提取许多错误.....

How about this:
original program: a > b
to get it fault, you change to b < a
After run, we get different result so we know that there is code error in the program. Is that so..?
thanks for the explanation.
Alright then one more question regarding this please, from your experience is there any example of complete numerical java program (open source)?
so from that I could learn to create/extract many faults.....



这个怎么样:

原始程序:a> b

为了弄错,你改为b< a

运行后,我们会得到不同的结果,因此我们知道程序中存在代码错误。是这样吗..?

感谢您的解释。

好​​的,还有一个关于此问题的问题,根据您的经验,是否有任何完整的数值Java程序(开源)的例子?

因此,我可以学习创建/提取许多错误.....
How about this:
original program: a > b
to get it fault, you change to b < a
After run, we get different result so we know that there is code error in the program. Is that so..?
thanks for the explanation.
Alright then one more question regarding this please, from your experience is there any example of complete numerical java program (open source)?
so from that I could learn to create/extract many faults.....



取决于你所说的完整数字。任何使用数字类型的程序都可以视为数字。您可以编写一个程序来解决二次方程式并使用它或一个来进行三次样条e.t.c您可以在互联网上找到很多这样的程序。我敢打赌,如果你自己写一个会更有趣。

Depends on what you mean by "complete numerical". Any program that uses a numerical type could be deemed numerical. You can write a program for solving a quadratic equation and play around with it or one to do a cubic spline e.t.c you can find lots of such programs on the internet. My bet is that it will be more fun if you write one yourself.


这篇关于有缺陷的java程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆