String Palindrome

String Palindrome
SOURCE : Stringplaindrome.java



public class Stringplaindrome {


public static void main(String[] args) {

String s1="abad";

for(int i =0,j=s1.length()-1;i
if(s1.charAt(i)!=s1.charAt(j)){
System.out.println("not plaindrome");
}else
{System.out.println("plaindrome");}

}

}

}


INPUT

String s1="abad";



OUTPUT

not plaindrome







Sandeep Kumar D

Hi, I have written and developed this post so that most of people will be benefited. I'm committed to provide easy and in-depth tutorials on various technologies.I hope it will help you a lot.

- Sandeep Kumar D

Follow Me @Google+




SHARE

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment