Java Random setSeed() MethodThe setSeed() method of Random class sets the seed of the random number generator using a single long seed. SyntaxParametersseed- It is the initial seed Return ValueExample 1Output: Random Integer value : -1882931681 Random Integer value : -1150867590 Example 2Output: Error:(11, 40) java: 'void' type not allowed here The setSeed() method has a void return type, and 'void' type are not allowed in system.out.println() function. Next TopicJava-scanner-close-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India