Answer Posted / pratyush kumar nayak
String Original,Reverse="";
System.out.println("Enter String To Reverse");
Scanner sc=new Scanner(System.in);
Original=sc.nextLine();
int length=Original.length();
for(int i=length-1;i>=0;i--){
Reverse=Reverse+Original.charAt(i);
}
System.out.println("The Reversed String is " + Reverse);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why is java so important?
What are inbuilt functions in java?
What is a short in java?
What are the three parts of a lambda expression? What is the type of lambda expression?
What are meta-annotations?
Explain about the main() method in java?
What is the public method modifier?
What is a substitution variable?
Can inner class be public in java?
How many static init can you have?
Can we have multiple public classes in a java source file?
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?
What is the use of arraylist in java?
How to split a string in java?
What is json parser in java?