Friday, February 10, 2017

Java Program to check whether the Operating System(Processor) is LITTLE ENDIAN or BIG ENDIAN.

import static java.lang.System.out;
import java.nio.ByteOrder;
class CheckEndian
{
static public void main(String...alt)
{
out.println("Processor Endian is : "+ByteOrder.nativeOrder());
/* if(ByteOrder.nativeOrder()==(ByteOrder.LITTLE_ENDIAN))
out.println("Processor is little endian");
else
out.println("Processor is big endian");*/
}
}

Share this

0 Comment to "Java Program to check whether the Operating System(Processor) is LITTLE ENDIAN or BIG ENDIAN."

Post a Comment