can you program for reverse string?

Answer Posted / suswagata choudhury

public class Reverse {
public static void main(String args[]){

String s="SUSWAGATA";
StringBuffer sb=new StringBuffer(s);
System.out.println(sb.reverse());
}
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between extends thread vs implements runnable in java?

813


Why is string buffer better than string ?

800


What is stack class in java?

776


What do you understand by java virtual machine?

926


Which number is denoted by leading zero in java?

1026


What is return code?

767


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

882


Difference between final and effectively final ? Why is effectively final even required ?

760


What is the difference between super class & sub class?

804


How you can force the garbage collection?

748


Can we use this () and super () in a method?

732


What is set string?

788


What is anti pattern in cyber security?

741


What is ellipsis in java?

816


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

737