Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DWORD datatype in VC++ nd its conversion in Java

I want to convert a convert a VC++ code into Java, Therefore which Java datatype sholud be used to replace DWORD datatype in VC++ ?

like image 278
Aesop Avatar asked Oct 10 '22 12:10

Aesop


1 Answers

You can use an int if you just need a 32-bit value. If you need to perform arithmetic operations or print the value you can use a long instead.

int i = /* 32-bit value */
long l = i & 0xFFFFFFFFL;

The long can be used as it can have values 0 to 2^32 (and more)

like image 200
Peter Lawrey Avatar answered Oct 13 '22 03:10

Peter Lawrey