i have a question but am confuse
the question is create and array of random double floating point numbers,calculate and print the sum off all the numbers in the array.truncates all of the numbers in the array up to 7 decimal places and then calculate and print the sum of the truncated numbers.calculate and print the difference between the actual sum of the numbersand the sum of the truncated numbers.the part i understand was how to
then you can use the java.text.NumberFormat class.

double value = 5.9999999999999;
NumberFormat nf = NumberFormat.getInstance();
String displayValue = nf.format(value);

//should print >5.9999999
but i dont kbnow haw to create a random double floating point numbers it just confuse me ,can someon help me out?please

What is the range of the random numbers? Because you can use the Math.random.
Check the API

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.