Why are there no binary literals in Java?

后端 未结 6 956
花落未央
花落未央 2020-12-17 09:15

Is there any particular reason why this kind of literal is not included whereas hex and octal formats are allowed?

6条回答
  •  孤城傲影
    2020-12-17 09:50

    The associated bug is open since April 2004, has low priority and is considered as a request for enhancement by Sun/Oracle.

    I guess they think binary literals would make the language more complex and doesn't provide obvious benefits...

提交回复
热议问题