What is the difference between the float data type and the double data type?

What will be an ideal response?


Java supports two floating-point data types: float and double. A float data type can hold floating-point values of up to six or seven significant digits of accuracy. A double data type requires more memory than a float, and can hold 14 or 15 significant digits of accuracy. The term significant digits refers to the mathematical accuracy of a value. For example, a float given the value 0.324616777 displays as 0.324617 because the value is accurate only to the sixth decimal position.

Computer Science & Information Technology

You might also like to view...

using namespace std; tells the compiler

a. where to get the definitions of certain objects (variables) b. where your program is located c. what language to use for input and output d. nothing

Computer Science & Information Technology

Since its launch in ________, Twitter has become the number-two social media site and one of the top ten websites on the Internet

Fill in the blank(s) with correct word

Computer Science & Information Technology

A program's main module occupies a designated place in memory called the ____.

A. branch B. stub C. stack D. base

Computer Science & Information Technology

Every time you use the ____ function, the file pointer moves to the next character in the file.

A. fgetc() B. fopen() C. fclose() D. fileread()

Computer Science & Information Technology