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

Give me an example of array and linked list? Where they can be used?

561


What is the function of compareto in java?

595


How can we pass argument to a function by reference instead of pass by value?

588


Why java is called not pure object oriented language?

583


What does string intern() method do?

592






What’s the difference between constructors and other methods?

536


What are the types of literals?

571


What does the “final” keyword mean in front of a variable? A method? A class?

549


What is a lightweight component?

600


Is this valid in java ? Can we instantiate interface in java?

550


How many decimal places is a double?

543


how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT

1856


How do singleton patterns work?

523


what do you understand by the term string with respect to java?

535


What is continuity of a function?

528