+ 1

Palindrome word...........

import java.io.*; class palindrome { public static void main(String args[])throws IOException { //input a word BufferdReader br =new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter a word "); String word= br.readLine(); //reversing String rev=""; //to store the reversed word for(int i= word.length()-1;i>=0;i--) { rev = rev + word.charAt(i); } //check palindrome if(word.equals(rev)) System.out.println(word + "is a palindrome word"); else

31st Mar 2020, 8:20 AM
s.j.morais
s.j.morais - avatar
1 Réponse
+ 3
Please don't write a sentence in thread tags 'pls help me in solving it'. Use the tag to specify a relevant programming language or subject, to improve context clarity 👍 BufferdReader br = new ... Maybe it is the culprit?
31st Mar 2020, 8:30 AM
Ipang