reverse string java
String string="whatever";
String reverse = new StringBuffer(string).reverse().toString();
System.out.println(reverse);
reverse string java
String string="whatever";
String reverse = new StringBuffer(string).reverse().toString();
System.out.println(reverse);
reverse sentence in java
// INPUT: "you shall not pass"
// OUTPUT: "pass not shall you"
String s[] = "you shall not pass".split(" ");
String ans = "";
for (int i = s.length - 1; i >= 0; i--) {
ans += s[i] + " ";
}
System.out.println(ans);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us