Changes between Version 37 and Version 38 of FAQ


Ignore:
Timestamp:
May 22, 2010, 11:29:41 AM (14 years ago)
Author:
Peter Baumann
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v37 v38  
    4747   A: Java does not have an 8-bit unsigned data type. Byte is a signed 8 bit and hence 255 is represented as -1. What you can do is to transform bytes to char by adding 2^8 if the 2^7 bit is set. Tested, works.
    4848
     49 * '''Q: When using division "/" as an induced operation I get unexpected results.'''
     50
     51   A: Division of two integers yields an integer. If you want to have a float result then you need to cast the operands (that is: at least one of them) to float or double.
     52