What unit does the SizeOf return?

17 views
Skip to first unread message

Vu Luong

unread,
Aug 12, 2020, 8:15:52 AM8/12/20
to MOA users
import moa.core.SizeOf;
public static void main(String[] args) {

   
float a = 10.0f;
   
System.out.println(SizeOf.fullSizeOf(a));

   
double b = 10.0D;
   
System.out.println(SizeOf.fullSizeOf(b));

}

Output:
16
24

I suppose the size of double and float is 8 bytes and 4 bytes respectively. What is the unit that the SizeOf uses?
Reply all
Reply to author
Forward
0 new messages