Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我认为这在带有指针的 C 中并不难。但是,如何在 Java 中做到这一点?例如,一个浮点数表示为 101001,而您想要 101001 表示的整数(显然缩短了,因为它们实际上是 32 位)?只是好奇。
我想你想要Float.floatToIntBits()。