News

In this section, we will learn how to reverse a number in Java using while loop, for loop and recursion. To reverse a number, follow the steps given below: First, we find the remainder of the given ...
assigned, write a code to reverse it. Do not use any additional arrays or Strings. 1. Take values at index 0 and last index and swap them 2. Take values at index 0+1 and last index-1 and swap them 3.