Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 16b0675

Browse files
author
Ram swaroop
committed
little and big endian done
1 parent 2ea91cd commit 16b0675

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package me.ramswaroop.bits;
2+
3+
import java.nio.ByteOrder;
4+
5+
/**
6+
* Created by IntelliJ IDEA.
7+
*
8+
* @author: ramswaroop
9+
* @date: 6/5/15
10+
* @time: 3:10 PM
11+
* @link http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Data/endian.html
12+
*/
13+
public class LittleAndBigEndian {
14+
15+
public static boolean isLittleEndian() {
16+
return ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN);
17+
}
18+
19+
public static void main(String a[]) {
20+
System.out.println(isLittleEndian());
21+
}
22+
}

0 commit comments

Comments
 (0)