dcsimg
Reversing a String without using java.lang.String and java.lang.StringBuffer methods
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dhaneesh_P
Posted On:   Monday, January 21, 2008 11:06 PM

How to reverse a String without using java.lang.String and java.lang.StringBuffer methods ?
the question goes like this
There should be a Class called StringReverse which had a constructor with the string to be reversed as parameter


			ie. class StringReverse{
			
String str;
StringReverse(String str){
this.str=str;
}
public String reverse(){
//the code goes here
}
}

Re: Reversing a String without using java.lang.String and java.lang.StringBuffer methods

Posted By:   Robert_Lybarger  
Posted On:   Sunday, February 3, 2008 10:52 PM

Are you *still* asking about this? What is this even for? Trying to win a bet or something? Here's the rub: if you can't use *any* String methods, then the initial String itself cannot even be evaluated in any context, so there is no solution. Then again, I've already asked you to clarify the question, and given a couple of ideas/options, so.....

Re: Reversing a String without using java.lang.String and java.lang.StringBuffer methods

Posted By:   Christopher_Koenigsberg  
Posted On:   Sunday, February 3, 2008 05:05 PM

Apache Commons StringUtils; char array; etc. etc.
About | Sitemap | Contact