Answer Posted / aravinda reddy
String reverse without using reverse method string class
public class StringReverse {
public static void main(String[] args) {
String str = "Aravind";
StringBuffer s = new StringBuffer();
char[] ch = str.toCharArray();
int n = ch.length;
for(int i=n-1;i>=0;i--)
s.append(ch[i]);
System.out.println(s.toString());
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
What is use of arraylist in java?
What do you mean by composition in java?
Difference between notify() method and notifyall() method in java?
What is set string?
Is sizeof a keyword in java programming?
placement papaers of spring computing technology
Why volatile is used in java?
How to display all the prime numbers between 1 and n (n is the number, get the input from user)
What is a Transient Object?
Can we override constructor?
What is yield () in java?
Why are the destructors for base class and derived class called in reverse order when the program exits
How do you bind variables?
How to create a fecelet view?