Advantage of using 0x01 instead of 1 for an integer variable?

后端 未结 4 1858
我在风中等你
我在风中等你 2020-12-16 12:44

Recently I came across a line like this

public final static int DELETION_MASK = 0x01;

why is it not like

4条回答
  •  甜味超标
    2020-12-16 13:26

    It is easy to understand. Whenever we think about masking then we always think in HEX or BIN numbers.

提交回复
热议问题