Free help with homework

Why join Brainly?

  • ask questions about your assignment
  • get answers with explanations
  • find similar questions


Import java. io.*;
class Sample
public static void main(String args[])throws IOException
String word,rev;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter the word which is to be checked whether it is a palindrome word or special word.\n"):
int len=word.length();
char ch1=word.charAt(0);
char ch2=word.charAt(len-1);
StringBuffer obj=new StringBuffer(word);
System.out.print("It is a pallindrome word.");
else if(ch1=ch2)
System.out.print("It is a special word.");
System.out print("It is neither a pallindrome word, nor a special word.");

0 0 0
The Brain
  • The Brain
  • Helper
Not sure about the answer?
Learn more with Brainly!
Having trouble with your homework?
Get free help!
  • 80% of questions are answered in under 10 minutes
  • Answers come with explanations, so that you can learn
  • Answer quality is ensured by our experts