Accept a name and print it in reverse form.

class Reverse
{
  public static void main(String args[])
  {
    String n="JOHN";
    int l=n.length();
    for(int i=l-1;i>=0;i--)
    {
      System.out.print(n.charAt(i));
    }
  }
}

Popular posts from this blog

Priority Scheduling Algorithm Java Program.

Implement UNIX system calls like ps, fork, join, exec family, and wait for process management (use shell script/ Java/ C programming).

Round Robin Scheduling Algorithm Java Implementation.