How can we create an empty varriable for datatype double? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can we create an empty varriable for datatype double?

25th Jun 2022, 7:14 AM
MoBin Arab
3 Answers
+ 1
If you want a double to be null , use Wrapper class Double. double a; // a = 0.0 Double b; // b = null https://www.javatpoint.com/wrapper-class-in-java
25th Jun 2022, 7:30 AM
Roland
Roland - avatar
0
I dont understand what is your question, but you can create a variable without initialize that: double a; This was your question?
25th Jun 2022, 7:18 AM
Domonkos Gyömörey
Domonkos Gyömörey - avatar
0
not for local variable, then you have to initialize before use it double d = 0; double d2= 0.0;
25th Jun 2022, 7:43 AM
zemiak