Answer Posted / milind s
Most of time in interview asked without using Build Function**
public String reverse(String arg)
{
String tmp = null;
if (arg.length() == 1)
{
return arg;
}
else
{
String lastChar = arg.substring(arg.length() - 1,
arg.length());
String remainingString = arg.substring(0,
arg.length() - 1);
tmp = lastChar + reverse(remainingString);
return tmp;
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
how to create multithreaded program? : Java thread
what is difference betweem home interface and remote interface?
What is an image buffer?
Program to Find the second largest element in an array.
What is t type java?
What are the three parts of a lambda expression?
What is multithreading in java?
how we can make a write-only class in java?
What is dynamic binding(late binding)?
How to perform linear search in java?
If you do not want your class to be inherited by any other class. What would you do?
Can a class be a super class and a sub-class at the same time? Give example.
Explain public static void main(string args[]).
What are abstract methods in java?
What is super keyword explain with example?