Skip to content

DUST2333/java-fix-add

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

简体中文

消灭第一个幺蛾子恶魔

没有什么能比动手实践更快地学到东西了。

没有什么能比真正动手修bug更快地学会编程了。

现在,我们的一个简单的Java程序中有一个幺蛾子恶魔, 消灭这个幺蛾子的方法就是提交一个Pull Request帮我们修复之。

挑战

  • 这个程序里有一个明显的bug:加法函数中的加号(+)被写成了减号(-)。
  • 请修复这个问题,然后创建一个Pull Request。
  • 机器人将会检查你的PR,告诉你你是否通过了挑战。
  • 回到字节传说,然后继续你的英雄旅程。

注意:我们只允许您修改以下文件,任何对其他文件的修改都会被拒绝:

  • src/main/java/com/bytelegend/Challenge.java

    有趣的小知识

    在1947年9月9日,葛丽丝·霍普(Grace Hopper)发现了世界上第一个电脑bug。 有一次Mark II突然宕机,原因是一只飞蛾意外飞入了一台电脑内部而引起了故障(如图所示)。 团队在日志本中记录下了这一事件。也因此,人们逐渐开始用“Bug”(原意为“虫子”)来称呼计算机中的错误。 现在在华盛顿的美国国家历史博物馆中还可以看到这份日志。 ——维基百科

    bug

Kill First Bug Evil

When it comes to learning, nothing is better than practice.

When it comes to learning programming, nothing is better than fixing a real bug.

Now, there is a Bug Evil in this simple Java program, the way to kill it is creating a pull request to fix it.

Challenge

  • There is an obvious bug in this program: the addition operator(+) is mistaken as substraction operator(-).
  • Please fix this issue and create a pull request.
  • The bot will check your PR and tell you if you accomplish the challenge.
  • Go back to ByteLegend and continue your hero journey.

Note: we only allow you to modify the following files. Any changes to files other than the following files will be rejected:

  • src/main/java/com/bytelegend/Challenge.java

Fun Fact

The term "bug" was used in an account by computer pioneer Grace Hopper, who publicized the cause of a malfunction in an early electromechanical computer. In 1947, operators traced an error in the Mark II to a moth trapped in a relay, coining the term bug. This bug was carefully removed and taped to the log book. Stemming from the first bug, today we call errors or glitches in a program a bug. ——Wikipedia

bug

About

Challenge of JavaIsland: Java Basic Structure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%