Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to reverse a string

Java: How to reverse a string
{filelink=12228}

public class Reverse_Str
{
  public static void main (String[] args)
  	{
    String str = "Welcom";
    StringBuilder lettersBuff = new StringBuilder(str);
    // reversing the string
	String str_inverse = lettersBuff.reverse().toString();
	System.out.println (str+ " => "+str_inverse);
    }  
}

Users who found this page were searching for:

  • iterate python dictionary
  • checkbox add table JAVa
  • python change dir in console

No comments yet.

Leave a Comment