Java Short reverseBytes Example

Short class reverseBytes method example. This example shows you how to use reverseBytes method.


Short class reverseBytes method example. This example shows you how to use reverseBytes method.

Here is the code.
 /** @(#) ReverseBytesShort.java
 * A class representing use of method reverseBytes() of Short class in java.lang Package.
 * @Version  03-May-2008
 @author   Rose India Team
 */
class ReverseBytesShort{
  public static void main(String[] args){
    short shortNum = 123;

    //Method returns the value after reversing the order of the bytes in the bibary representation of the specified short value.
    short shortValue = Short.reverseBytes(shortNum)
    System.out.println("value after reversing the order of the bytes for specified  is : " + shortValue);
  }
}

null

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US