ppt课件-building java programs(构建java项目).pptVIP

  • 8
  • 0
  • 约4.68千字
  • 约 10页
  • 2017-01-25 发布于四川
  • 举报

ppt课件-building java programs(构建java项目).ppt

Copyright 2008 by Pearson Education * Copyright 2008 by Pearson Education Building Java Programs Chapter 5 Lecture 5-2: Random Numbers reading: 5.1 - 5.2 self-check: #8 - 17 exercises: #3 - 6, 10, 12 videos: Ch. 5 #1-2 The Random class A Random object generates pseudo-random* numbers. Class Random is found in the java.util package. import java.util.*; Example: Random rand = new Random(); int randomNumber = rand.nextInt(10); // 0-9 Method name Description nextInt() returns a random integer nextInt(max) returns a random integer in the range [0, max) in other words, 0 to max-1 inclus

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档