class interChange
{
public static void main(String args[])
{
String val=args[0];
String f,l,newrep;
int len;
len=val.length();
f=val.substring(0,1);
l=val.substring(len-1,len);
System.out.println(val);
newrep=l+val.substring(1,len-1)+f;
System.out.println(newrep);
}
}
No comments:
Post a Comment