11 กรกฎาคม, 2550

Method Summary

Method Summary

next(int bits) Generates the next pseudorandom number.

nextBoolean() Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.

nextBytes(byte[] bytes) Generates random bytes and places them into a user-supplied byte array.

nextDouble() Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.

nextFloat() Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.

nextGaussian() Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence.

nextInt() Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.

nextInt(int n) Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.

nextLong() Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.

setSeed(long seed) Sets the seed of this random number generator using a single long seed.

ลำดับในการประมวล

ลำดับในการประมวลของ Operators ต่าง ๆ



ตัวอย่าง การคำนวณโดยใช้ Operator1



ตัวอย่าง การคำนวณโดยใช้ Operator2

ตัวดำเนินการตรรกะ

ตัวดำเนินการตรรกะ (Logical Operators)
ตัวดำเนินการทางตรรกะจะทำประมวลผลกับตัวแปรประเภท Boolean หรือ นิพจน์ที่ให้ค่าของข้อมูลเป็นจริงหรือ เท็จ




รูปแบบของ Boolean Operator และตัวอย่างการประมวลผล




ตัวอย่าง การใช้ Operator แบบ boolean










ตัวดำเนินการสัมพันธ์

ตัวดำเนินการสัมพันธ์ (Relational Operators)
คือตัวดำเนินการที่ทำหน้าที่เปรียบเทียบค่าระหว่างตัวแปรสองตัว หรือนิพจน์สองนิพจน์ โดยจะคืนค่าเป็นจริงหรือเท็จ (Boolean)