Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
Explain Math.random() guarantees uniqueness?
Home
Education
Explain Math.random() guarantees uniqueness?
asked
Feb 24, 2022
in
Education
by
JackTerrance
Math.random() guarantees uniqueness? (a) True (b) False This question was posed to me in quiz. Enquiry is from Random Number topic in section java.util – More Utility Classes of Java Select the correct answer from above options
java
util
1
Answer
0
votes
answered
Feb 24, 2022
by
JackTerrance
Best answer
The correct answer is (b) False The explanation: Math.random() doesn’t guarantee uniqueness. To guarantee uniqueness we must store the generated value in the database and compare against already generated values.
Related questions
0
votes
Q: Explain What is the return type of Math.random() method?
What is the return type of Math.random() method? (a) Integer (b) Double (c) String (d) Boolean This ... More Utility Classes of Java Select the correct answer from above options...
asked
Feb 24, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What is the range of numbers returned by Math.random() method?
What is the range of numbers returned by Math.random() method? (a) -1.0 to 1.0 (b) -1 to 1 (c) ... util - More Utility Classes of Java Select the correct answer from above options...
asked
Feb 24, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Math.random() guarantees uniqueness?
Math.random() guarantees uniqueness? (a) True (b) False This question was posed to me in quiz. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Oct 24, 2021
in
Education
by
JackTerrance
essential-javascript-interview-questions
javascript-interview-questions
javascript-interview-questions-and-answers
javascript-questions-for-practice
java-script-mcq-quiz
javascript-quiz-
javascript-multiple-choice-questions
javascript-mcq-with-answers
0
votes
Q: Explain Which class is used to generate random number?
Which class is used to generate random number? (a) java.lang.Object (b) java.util.randomNumber (c) java. ... Utility Classes of Java Select the correct answer from above options...
asked
Feb 24, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Which method is used to generate boolean random values in java?
Which method is used to generate boolean random values in java? (a) nextBoolean() (b) randomBoolean() (c) ... Utility Classes of Java Select the correct answer from above options...
asked
Feb 24, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Random is a final class?
Random is a final class? (a) True (b) False I got this question by my college professor while I was ... More Utility Classes of Java Select the correct answer from above options...
asked
Feb 24, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain How many bits are used for generating random numbers?
How many bits are used for generating random numbers? (a) 32 (b) 64 (c) 48 (d) 8 The question was ... - More Utility Classes of Java Select the correct answer from above options...
asked
Feb 24, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain When two threads access the same ArrayList object what is the outcome of the program?
When two threads access the same ArrayList object what is the outcome of the program? (a) Both are able ... Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain How is Arrays.asList() different than the standard way of initialising List?
How is Arrays.asList() different than the standard way of initialising List? (a) Both are same (b) ... Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What is the difference between length() and size() of ArrayList?
What is the difference between length() and size() of ArrayList? (a) length() and size() return the ... Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Which class provides thread safe implementation of List?
Which class provides thread safe implementation of List? (a) ArrayList (b) CopyOnWriteArrayList (c) HashList (d) ... Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Which of the below is not an implementation of List interface?
Which of the below is not an implementation of List interface? (a) RoleUnresolvedList (b) Stack (c) AttibuteList ... Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What is the worst case complexity of accessing an element in ArrayList?
What is the worst case complexity of accessing an element in ArrayList? (a) O(n) (b) O(1) (c) O( ... The Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain What is the default clone of HashSet?
What is the default clone of HashSet? (a) Deep clone (b) Shallow clone (c) Plain clone (d) Hollow ... Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
0
votes
Q: Explain Do we have get(Object o) method in HashSet.
Do we have get(Object o) method in HashSet. (a) True (b) False The question was posed to me by my ... The Collections Framework of Java Select the correct answer from above options...
asked
Mar 1, 2022
in
Education
by
JackTerrance
java
util
...