answersLogoWhite

0

suppose n is a number i.e n=325 First we shall divide that number by 10 then store this number in a variable called quation i.e q=n/10 here q=32 . we take one variable say m and store the value of n in that variable i.e n=m And then we shall find remender of that number by dividing 10 i.e n=n%10 we get 5 then we will reverse that number i.e r=r*10+n and then we will repeate the same step if reverse of that number is same as the number entered then that number is called paindrom code: class palindrom { public static void main(String args[]) { int n,m,s,r; n=m; for(s=0;n>0;) { q=n/10; r=n*10; s=s*10+r; n=q; } if (m==r) { System.out.println("Palindrom"); } else { System.out.println(" not Palindrom"); } } } Wrriten By:-Rajkumar Gupta

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How do you create setup of core java project?

how to create setup file in core java


What is pallendrome in java?

palindrome in every language means same. it means on reversing a number or string, if we get the same number or string as the case may be ,then the number or string is called palindrome. eg: 1221,111,252 or LIRIL,MADAM etc .


Who create Java and when?

Who create Java & when? Why he create java ? What are mane functions of it?


What are the features of core java?

Core java refers to the core or basic concepts of the Java programming language. Things like encapsulation, inheritance, multi-threading, exception handling and other basic feature of java that comes as part of the Java standard edition forms Core Java


What is the definition of Core Java?

Core java refers to the core or basic concepts of the Java programming language. Things like encapsulation, inheritance, multi-threading, exception handling and other basic feature of java that comes as part of the Java standard edition forms Core Java


What are the features of the core?

Core java refers to the core or basic concepts of the Java programming language. Things like encapsulation, inheritance, multi-threading, exception handling and other basic feature of java that comes as part of the Java standard edition forms Core Java


What is the most efficient way to find the longest palindrome subsequence in Java?

One efficient way to find the longest palindrome subsequence in Java is by using dynamic programming. This involves creating a 2D array to store the lengths of palindrome subsequences for different substrings of the input string. By iterating through the string and filling in the array based on the palindrome properties, you can determine the longest palindrome subsequence.


What is Difference between java and core java?

Java or Java SE comes with the standard library, with all the crazy classes to make life easy. Java Core does not come with most of these classes, so that it is a lot smaller.


Does servlet come under core java?

Core java comes with J2SE specification Web and distributed enterprise applications in java comes with J2EE specification


What is the Exact difference between core java advanced java?

Core java consists of basics of java language (OOP, Threading, Exceptions, Collections, Annotations, Internationalization etc) along with other technologies like JDBC, Servlets. Advanced java is the next step of core java. This consists of JSP, EJB, Beans etc.


Which one is more advanced core java or java?

The Core Java technologies and application programming interfaces (APIs) are the foundation of the Java Platform, Standard Edition (Java SE). They are used in all classes of Java programming, from desktop applications to Java EE applications. Well What exactly you mean by Java?


How can you learn core java?

You could probably watch some tutorials on youtube, or buy a book on core java script.