Double a()=new Double(25); | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Double a()=new Double(25);

what is the total memory occupied by this array statement

26th Jan 2017, 2:47 PM
Sambit sinha
1 Answer
+ 1
I would say zero. Your code is not working. You declare a simple variable a type Double. If you want a varible: Double a = new Double(25); And if you want and array of 25 elements: Double[] a = new Double[25]; And to know the size just need to check on you JVM
26th Jan 2017, 3:33 PM
Florian Castelain
Florian Castelain - avatar