java 课后答案02review.docVIP

  • 6
  • 0
  • 约4.71千字
  • 约 5页
  • 2018-01-10 发布于河南
  • 举报
java 课后答案02review

Chapter 2 Elementary Programming 1. Valid identifiers: applet, Applet, $4, apps, x, y, radius Invalid identifiers: a++, --a, 4#R, #44, class, public, int Keywords: class, public, int double miles = 100; final double KILOMETERS_PER_ MILE = 1.609; double kilometers = KILOMETERS_PER_ MILE * miles; System.out.println(kilometers); The value of kilometers is 160.9. 3. There are three benefits of using constants: (1) you don’t have to repeatedly type the same value; (2) the value can be changed in a single location, if necessary; (3) the program is easy to read. final int SIZE = 20; 4. a = 46

文档评论(0)

1亿VIP精品文档

相关文档