0

Type of data in java

Hi How can we have long double data in java? for example: 0.0000002

7th Jul 2020, 5:38 PM
Zahra
6 Answers
+ 5
Zahra Yes you can use either double or float datatypes
7th Jul 2020, 6:02 PM
Nilesh
Nilesh - avatar
+ 6
Your question doesn't seems to be clear . If your are asking about datatype the it's the type of data to be stored in a variable. •Primitive Data types •Non primitive datatype For long long a = 500000L; double b = 43.7;
7th Jul 2020, 5:43 PM
Nilesh
Nilesh - avatar
+ 3
Zahra long num = 1000; double amount = 100.50;
7th Jul 2020, 5:43 PM
A͢J
A͢J - avatar
+ 3
Zahra Make variable c of double data type.
7th Jul 2020, 6:01 PM
A͢J
A͢J - avatar
+ 1
for example: c=a/b=0.0000002 When we want to print c, 0 is printed What can I do to print exact amount of c?
7th Jul 2020, 5:53 PM
Zahra
0
Double and float
9th Jul 2020, 2:14 AM
shubham kumar
shubham kumar - avatar