Can anyone pls help me to generate random numbers without using any API???
chandanapapa 0 Newbie Poster
Recommended Answers
Jump to PostYou could use the time in millis and take the last digit:
System.currentMillis(); if I remember correct the method.
Jump to PostWhy don't you look at the source code for nextDouble (or some other method) of the java.util.Random class?
Jump to PostYou could use the time in millis and take the last digit:
System.currentMillis(); if I remember correct the method.that would be using "any API".
In fact the mere act of creating a class has you using "any API".
All 9 Replies
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
jwenting 1,889 duckman Team Colleague
jinternalframe 1 Newbie Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
jinternalframe 1 Newbie Poster
jwenting 1,889 duckman Team Colleague
jinternalframe 1 Newbie Poster
jwenting 1,889 duckman Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.