整型转为字节数组后地址顺序发生了变化,为什么?
import java.io.*;public class Test2{ public static void main(String[] args) throws IOException { int a = 0x12345678; ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(baos); dos.writeInt(a); byte[] b = baos.toByteArray(); for(int i = 3; i >= 0; i--) { System.out.print(Integer.toHexString(b[i])); } System.out.println(); }}// Output: 785634120x12在int中应该是高地址,转为字节数组后为什么是低地址了?