StringBuilder tempString = new StringBuilder(); tempString = tempString.append(Math.random() * (9 - 0 + 1) + 0);
-I'm trying to assign 9 random digits(one char at a time) to a local StringBuilder object. But its not working. The number I get when I print tempString is:
7897 893. 9660 7073 7313 6326 1
And I want something like so:
7897 8931 4062 1219
Could someone please tell me what is wrong?
Thank you for your time!

New Topic/Question
Reply



MultiQuote





|