jacky bushy wrote:
the above code is used to convert the hexadecimal to the long,
I donot know why use "&H" & in vb6 code,
and how to translate it into the java code
"&H" & strHex
just puts "&H" in front of the string strHex. '&' concatenates
two strings in VB. Prepending strHex with "&H" is necessary
to make VB interprete the string as a hexadecimal string.
Just enter "&H" and "VB" in your Google search bar, and you can read all
Now, for the Java version:
have a look at the String class API, you will see a very handy constructor
that takes a byte array as input.
Next, have a look at the Long class API, section 'parsexxx'. You will
find a convenient method there.
Give it a try.
There are three kinds of actuaries: those who can count, and those who can't.
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo: