I've reed this code which is in C format but i didn't understand what's the process exactly. can anyone explain it for me in java or if there is a better way in java could you please write it here? thank you
bool endianess(){
int testNum;
char *ptr;
testNum=1;
ptr=(char*) &testNum;
return (*ptr); //* return the byte at the lowest address
}