Pages

get our extension

Search program

Monday, 29 April 2013

Java Program To Reverse String Using Command Line Argument ....


package com.alok;

public class String_recerse_command_line
{
public static void main(String[] args)
{
String string=args[0];
String reverse = new StringBuffer(string).
reverse().toString();
System.out.println("\nString before reverse: "+string);
System.out.println("String after reverse: "+reverse);
}
}

O/P :- 


No comments:

Post a Comment