Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4a36e1e

Browse files
Add files via upload
1 parent 233a9d0 commit 4a36e1e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

‎Misc Programmes/Palindrome.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class Palindrome{
2+
public static void main(String args[])
3+
{
4+
String word=args[0],reverse="";
5+
int n=word.length(),i;
6+
for(i=n-1;i>=0;i--)
7+
{
8+
reverse=reverse+word.charAt(i);
9+
}
10+
System.out.println("Reverse of given word is :"+reverse);
11+
if(word.equalsIgnoreCase(reverse))
12+
{
13+
System.out.println("So the string is Palindrome.");
14+
}
15+
else
16+
{
17+
System.out.println("So the string is not Palindrome.");
18+
}
19+
}
20+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /