正在加载图片...
The if statement //Assume messageBox and inputBox are declared and created //Assume testscore is declared testscore inputBox. getInteger("Enter test score: )i f(testscore 70) This statement is messageBox. show("You did not pass)i executed if the testscore ess than 70 else This statement is messageBox. show("You did pass") executed if the testscore is 70 or higher C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 6-3© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 6 - 3 The if Statement //Assume messageBox and inputBox are declared and created //Assume testScore is declared testScore = inputBox.getInteger("Enter test score:"); if (testScore < 70) messageBox.show("You did not pass"); else messageBox.show("You did pass"); This statement is executed if the testScore is 70 or higher. This statement is executed if the testScore is less than 70
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有