please can some one solve this java program please
Attachments:
Answers
Answered by
1
Answer:
class Main {
public static void main(String[] args) {
String str = "Radar", reverseStr = "";
int strLength = str.length();
for (int i = (strLength - 1); i >=0; --i) {
reverseStr = reverseStr + str.charAt(i);
}
if (str.toLowerCase().equals(reverseStr.toLowerCase())) {
System.out.println(str + " is a Palindrome String.");
}
else {
System.out.println(str + " is not a Palindrome String.");
if str==reverseStr()
system.out.println(str)
system.out.println(reverseStr)
}
}
}
hope so it helps
agar thodi bht mistake ho to please check kr lena actually ABHI python ki aadat ho gyi h isliye thoda thoda issue hota h .
Similar questions
Accountancy,
8 days ago
English,
8 days ago
Social Sciences,
8 days ago
Chemistry,
16 days ago
Chemistry,
16 days ago
Chemistry,
8 months ago
English,
8 months ago
Math,
8 months ago