这意味着“使基元变窄截断高阶位"是什么意思? [英] What does this mean "Narrowing a primitive truncates the high order bits"
本文介绍了这意味着“使基元变窄截断高阶位"是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这意味着缩小基元会截断高阶位"是什么意思
What does this mean "Narrowing a primitive truncates the high order bits"
推荐答案
例如如果将long强制转换为int,则将丢弃long的较高位.
E.g. if you cast long to int you are discarding the higher bits of the long.
Short -> Byte
0x00FF -> 0xFF
256 -> -128
这篇关于这意味着“使基元变窄截断高阶位"是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文