java.lang.Character.reverseBytes() is a built-in method in java which returns the value obtained by reversing the order of the bytes in the specified char value.
public static char reverseBytes(char ch)
Parameter: The function accepts one mandatory parameter ch which signifies the character whose order of bytes is to be reversed.
Returns: This method returns the value obtained by reversing (or, equivalently, swapping) the bytes in the specified char value.
Below programs illustrate the java.lang.Character.reverseBytes() function:
Reversing bytes on ? gives M
Reversing bytes on 9 gives ? Reversing bytes on 7 gives ?
- Java.util.LinkedList.poll(), pollFirst(), pollLast() with examples in Java
- Java lang.Long.builtcount() method in Java with Examples
- Java.util.concurrent.RecursiveAction class in Java with Examples
- Java lang.Long.reverse() method in Java with Examples
- Java lang.Long.numberOfLeadingZeros() method in Java with Examples
- Java lang.Long.numberOfTrailingZeros() method in Java with Examples
- Java lang.Long.highestOneBit() method in Java with Examples
- Java lang.Long.byteValue() method in Java with Examples
- Java.util.Collections.disjoint() Method in java with Examples
- Java lang.Long.lowestOneBit() method in Java with Examples
- Java.util.concurrent.RecursiveTask class in Java with Examples
- Java.lang.Short toString() method in Java with Examples
- Java.util.function.LongPredicate interface in Java with Examples
- Java.util.function.DoublePredicate interface in Java with Examples
- Java.util.function.BiPredicate interface in Java with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.