Answer Posted / soumya roy
public class rev
{
public static void main(String[] args)
{
String str="hi my name is hello ";
System.out.println("the string is :" + str);
char[] ch=str.toCharArray();
int i;
int len = ch.length;
for(i=len-1;i>=0;i--)
{
System.out.print(ch[i]);
}
}
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Difference between ‘is-a’ and ‘has-a’ relationship in java?
Why spring singleton is not thread safe?
What is preflight request?
What is variable and rules of variable?
Can you declare a private method as static?
What is consumer in java?
Can we use return in constructor?
What’s a deadlock?
Can we inherit inner class?
What about static nested classes in java?
What is generic class?
How would you format a date in java? I.e. In the ddmmyyy format?
What is abstract class constructor called?
Explain about anonymous inner classes in java?
Have you ever used hashtable and dictionary?