1.

Math.random() guarantees uniqueness?(a) True(b) FalseThis question was posed to me in quiz.Enquiry is from Random Number topic in section java.util – More Utility Classes of Java

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.



Discussion

No Comment Found

Related InterviewSolutions