rev java code example Example: reverse a string in java As we know that String is immutable. String class do not have reverse() method.