Java Random nextLong() MethodThe nextLong() method of Random class returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence. SyntaxParametersNA Return ValueThe nextLong() method returns the next pseudorandom, uniformly distributed long value. Example 1Test it NowOutput: Random Integer value : 3977537424970713389 Random Integer value : 5733671541347552387 Example 2Test it NowOutput: 7543819037091046117 -3342512197386667364 -4465337898535811745 2349346495373509042 -6952569592634674749 Example 3Test it NowOutput: FirstName-Reema : LastName-Panda : [email protected] : Id--6149450654700259232 FirstName-Geetanjali : LastName-Sharma : [email protected] : Id--1351029507738091616 FirstName-Vineet : LastName-Tanjea : [email protected] : Id--2724724873264125475 FirstName-Himanshu : LastName-Bhardwaj : [email protected] : Id--2199305912644374368
Next TopicJava Random
|