Saturday, January 19, 2019

Palindrome Number: A Palindrome number is a number that remains the same when its digits are reversed.
We get total 90 numbers between 100 and 1000.

public class PalindromeNumber {

public static void main(String[] args) {

int n=121;
int rev=0;
int temp=n;
while(n!=0){
rev=rev*10+n%10;
n=n/10;
}
if(temp==rev){
System.out.println(temp+" Is Palindrome");
}else{
System.out.println(temp+" Is Not Palindrome");
}
}
}

Related Posts:

  • How to iterate through a Map Elements we cannot iterate a Map directly using iterators, because Map are not Collection. There are different methods to iterate through MAP elements: Method 1: Using Iterator and keySet(). package seleniumrepo; import java.ut… Read More
  • Armstrong Program in Java Write a Java program to find whether given number is Armstrong or not Armstrong numbers are: 153, 370, 371, 407 Definition: We call a given number as Armstrong if it is equal to the sum of the powers of its own digits. Ex:&n… Read More
  • Extract numeric value from a String                    package seleniumrepo;                           public class ExtractNumerics{  … Read More
  • White Box Testing (WBT) vs Black Box Testing (BBT) Difference between White Box Testing and Black Box Testing: WBT: This is defined as method of testing in which one can perform testing on an application having internal structural knowledge of it. This is also kno… Read More
  • Anagram program in java package seleniumrepo; import java.util.Arrays; /*  * Check whether two strings are anagram of each other  * Ex: LISTEN <=> SILENT, TRIANGLE <=> INTEGRAL, HEART <=> EARTH  */ public cl… Read More

0 comments:

Post a Comment

Selenium Training in Realtime

Blog helps to a student or IT employee to develop or improve skills in Software Testing.

Followers

About Me

My photo
Hyderabad, Andhra Pradesh, India
I am Automation Testing Professional. I have completed my graduation in B.Tech (Computers) from JNTU Hyderabad and started my career in Software Testing accidentally since then, I passionate on learning new technologies

Contact Form

Name

Email *

Message *

Popular Posts