palindrome number in java

Solutions on MaxInterview for palindrome number in java by the best coders in the world

showing results for - "palindrome number in java"
Amelie
12 Oct 2018
1public static boolean checkPalindrome(String str)
2{     
3 
4    int len = str.length();
5
6    for(int i = 0; i < len / 2; i++)  {
7        if (str.charAt(i) != str.charAt(len - i - 1))
8            return false;
9    }
10    return true;
11}
Emi
01 Jan 2019
1import java.util.*;   
2class PalindromeExample2  
3{  
4   public static void main(String args[])  
5   {  
6      String original, reverse = ""; // Objects of String class  
7      Scanner in = new Scanner(System.in);   
8      System.out.println("Enter a string/number to check if it is a palindrome");  
9      original = in.nextLine();   
10      int length = original.length();   
11      for ( int i = length - 1; i >= 0; i-- )  
12         reverse = reverse + original.charAt(i);  
13      if (original.equals(reverse))  
14         System.out.println("Entered string/number is a palindrome.");  
15      else  
16         System.out.println("Entered string/number isn't a palindrome.");   
17   }  
18}  
Giorgia
18 Mar 2016
1import java.util.Scanner;
2
3public class Palindrome
4{
5  public static void main(String args[])
6  {
7    int num,temp,reverse=0;
8    Scanner input=new Scanner(System.in);
9    num=in.nextInt();
10    temp=num;
11    //code to reverse the number
12    while(temp!=0)
13    {
14      int d=temp%10; //extracts digit at the end
15      reverse=reverse*10+d;
16      temp/=10; //removes the digit at the end
17    }
18    // 'reverse' has the reverse version of the actual input, so we check
19    if(reverse==num)
20    {
21      System.out.println("Number is palindrome");
22    }
23    else
24    {
25      System.out.println("Number is not palindrome");
26    }
27  }
28}
María Fernanda
09 Jun 2019
1package test
2//The function below checks if a string is a palindrome
3//True = Is a palindrome & False = Not a palindrome
4	public boolean isPalindromString(String text){
5    	String reverse = reverse(text);
6      	if(text.equals(reverse))
7    	{
8        	return true;
9      	}
10      
11      	return false;
12    }
13//This function returns the reverse String of its input.
14//Ex. if given "hello", it will return "olleh"
15	public String reverse(String input)
16    {     
17		if(input == null || input.isEmpty())
18        {
19			return input;
20        }
21        	return input.charAt(input.length()- 1) + reverse(input.substring(0, input.length() - 1));
22    }
Oscar
06 Sep 2017
1 public boolean isPalindrome(int x) {
2        String str = Integer.toString(x);
3        String reverse =  new StringBuilder(str).reverse().toString();
4        return  str.equals(reverse)?true:false;
5     }
Camilo
16 Feb 2016
1package test
2//The function below checks if a string is a palindrome
3//True = Is a palindrome & False = Not a palindrome
4	public boolean isPalindromString(String text){
5    	String reverse = reverse(text);
6      	if(text.equals(reverse))
7    	{
8        	return true;
9      	}
10      
11      	return false;
12    }
13//This function returns the reverse String of its input.
14//Ex. if given "hello", it will return "olleh"
15	public String reverse(String input)
16    {     
17		if(input == null || input.isEmpty())
18        {
19			return input;
20        }
21return input.charAt(input.length()- 1) + reverse
22                         (input.substring(0, input.length() - 1));
23    }
queries leading to this page
program to print palinf 5cdrome in javapalindrome a string in javawrite a programme to check pallindrome of num javajava program to find whether a number is palindrome or notjava program to check whether a number is palindrome or notpalindrome string in java geeksforgeekspalindrome method java define palindrome in javahow to create a number palindrome in javastring special palindrome in java 8function palindrom javagiven a string 2c write a java function to check if it is palindrome or notwrite a funnciton its take a string and return palindrom number in javawrite java program to check if a number is palindrome in java 3fjava check palindrome stringcreating a palindrome in javapalindromes from 1 to n in javaprogram to check palprime in javacheck whether a word is palindrome or not in javawrite a java program for palindrome numberpalindrome date program in javapalindrome java optimizepalindrome string program in javacalculate palindrome numbers in a range in javahow to check a word for palindrome in javajava program to check whether string is palindromecheck if a number is palindrome javawrite a program to check whether a string is palindrome or not in javajava program to check if string is palindromepalindrome in jvak palindrome program in javawrite a simple java program to check if a given string is palindrome or not using a boolean method to find a palindrome javacheck a string is a palindrome or not in javajava program to check palindromicity of a programprogram to check palindrome javacheck no is palindrome or not in javapalindrome program javacheck a string is palindrome or not in javafind count of palindromes in a string in javacheck no is a palindrome or not in javapalindrome string with remainder javais palindrome java in builtwrite a java program to accept a number and check if it is a palindrome how to find the largest palindrome in javapalindrome code in javacheck if palindrome in javapalindrome using java 8how to do palindrome in javahow to check panlindrome in javasentence palindrome javajava program to check palindrome string in a efficient waypalindrome ll in javaprint palindrome or not in javato check if a string is palindrome in javapalindrome java codepalindromic checking in javahow to check palindrome number in java gfghow to check if a string contains a palindrome in javajava check if string is palindromecheck if a string is palindrome in javapalindrome lab javahow to check if string is palindrom javais palindrome program in javapalindrome string ajvapalindromic numbers range in javapalindrome program in java whether string or numberpalindrome integer javafind whether the given number is palindrome or not check if a sentence is palindrome javacheck number palindrome javahow to solve palindrome problem in java with 5 test casescheck if string is a palindrome javapalindrome in java time complexity string palindrome in javapalindromenumber program in javapalindromic score javapalindrome with javajava palindrome codejava number is palindromechange one character to get palindrome in javapalindrome number in java using string methodscheck palindrome of a number in javapolyndrom java code with scannerwrite a jaba program to check if a string is pallindormea palindrome is a number that reads the same java solutionjava program to check palindrome string using collectionchecking a palindrome string in javapalindrome in java for a wordcheck if string is palindrom javawrite a program to accept a number from the user through command line and display whether the given number is palindrome or not palindrome no in java gfgcheck for palindrome javachecking if integer is palindrome javafind the palindrome in a string javalongest palindrome in a string in javapalindrom program in javapalindrome string using arrats javapalindrome number in java from 1 to 1000write a simple palindrome program in javapalindrom using menthod javato check number is palindrome or not in javapalindrome series in javapalindrome of integer in javahow to check if the string is palindrome javachecking long string palindrome in javajava code for palindromenumber palindrome program in javapalindromo java codigopslindrome in javafinding palindrome in a string javapallindrome in javapalindrome function in javuse stack to check palindrome javajava coding palindromewrite a program to check whether a number is palindrome or not in javawrite a java program palindrome or notpalindrome string java string is palindrome in javajava palindrome functionhow to check palindrome string in javarange of palindrome in javastring plandrom example in javapalindrome java checkjava program to find palindrome numberpalindrome string in javafunction to check given string string is palindrome or not in javapalingrome in javahow to find a string is palindrome or not in javapalindromic string in javawrite a function in java pallindrome stringis palindrome 3f javajava code for palindromwrite a program to check whether a string is palindrome or not javaalmost palindrome javahow to find palindrom in javajava palindrome interface exampleandroid check if a string is a palindrom numberchecking for palindrome in javajava program to check given number is pallindrome or notprogram related to palindrome in javapalindrome no logic in javato check whether number is palandrome or not in javahow to find palindrome in javawap palindrome in javais palindrome function in javacheck palindrome in java using while loopis palindrome possible program in java wipropalindrome noin javainteger palindrome check in javamatch two string for palindrome in javahow to check that wheater the word is pallindrome using javajava program for pallindromepalindrome simple program in javajava program find integer as palindromepalidrome in javahow to palindrome a int in javacheck string is palindrome or not in javapalindrone check string javalongest palindrome in javahow to generate palindrome numbers in javajava program to find whether the number is palindrome or notjava is string palindromepalidrim string in javafind given number palindrom or not javahow to make a palindrome javajava program to check whether a number is palindrome or not using while loophow to traverse a palindrome javadetect palindrome in javapalindrome or not in javahow to print a palindrome in javachecking if an integer is a palindrome javajava program to find whether the given number is palindrome or nothow to print palindrome javareverse palindrome program in javaplaindrome javaarray palindrome javano of palindrome numbers in range in javahow to do a palindrome method in javapalindrome string in java with a fixed lengthmake a string palindrome in javapalindrome for phrase in javaprogram in java to check string is palindromepalindrome string algorithm javaprograam to check palindrome java java program to find the palindrome numbers in an arrayfind if given string is palindrome in javastring palindrome in java using functionstring palindrome program in java using for looppalindrome in java geeksforgeeksmake a palindrome in netbeanscheck if a number is palindrome in javapalindrome string in java programchecking palindrome in java wap in java to check whether a string is palindrome or not how to palindrone in javahow to check if something is a palindrome in javapallindrome program in javacheck palindrome in javacheck string palindrome in javapalindrome prime number in javapalindrome or not in java programpalindrome for integer in javafonction palindrome en javamake palindrom javajava program for palindromecheck palindrome string in javajava program for palindrome stringfunction to check string is palindome in javahow to check for a palindrome in javahot to code if a number is palindrome in javapalindrome number in diamond in javapalindrome java questions palindrome number in java using methodshow to check if a string is a palindrome in javacheck is a string is a palindrome javahow to find next palindrome stringin javahow to check if a number is a palindrome in javapalindrome logic in java java to detect a palindromecreate palindrome from a string javachecking for palindrome array in javahow to count palindrome in javaword is palindrome in javastring is palindrome or not in javapalindrome method in javajava program to check palindromewrite a java program to check if an input number is a palindrome or not java check palindromepalindrom in javahow to see if a string is palindrome or not in java programsubstring palindrom javanumber is palindrome javajava palindrome number programwap to check whether a number is palindrome or not javaprogram to check palindrome in javapalindrome app in javahow to make user defined function for palindrome in javawhat is a palindrome number in javajava program to print all palindrome words in a stringjava palindromeswrite a function f that determine string is palindrome javapalindrome range in javaprogram to find palindrome string in javapalindrome check in javacheck palindrome in java in range for nubmerpalindrome using string in javapalindrome for string in javanumber palindrome javahow to check if int is palindrome javapalindrom check javajava method to check palindromepalindrome in java intcheck if int is palindrome javawrite a program that prints if the given input string is a palindrome or not java check if palindromehow to check given number is palindrome or not in javajava palindrom easyint palindrome in javapalindrome printing in javacheck whether a number is palindrome or not in javapelindrom logic javafunction to check palindrome in javajava code for integer palindromestring palindrome in javahow to check whether a word is palindrome or not in java without using string functionjava code for palindrome stringpalindrome code javajava palindrome solutionpalindrome numbers in javapalindrome path in javapalindrome program in java using stringbuildera number is palindrome or not in javacheck for palindrome for integer in javapalindrome check javacheck for palindrome in javanumerical diamond palindrome program in javapalindrome java programssimplifystring palindrome javahow do you check if a given string is palindrome or not 3f by java 8how to code a palindrome in javajava code for finding a palindrome numberjava program to check whether string is palindrome using library methodspalindrome checker java with string functionswrite a program to enter a number and check whether it is palindrome number or not sub palindrome in javajava check if numbers are palindromejava program for palindrome or notcheck number is palindrome in javahow to check palindrome in java palindrome javaa palindrome javareverse string java palindromepalindrome using predicate in java 8java palindrom explainedhow to find whether a string is palindrome or not javapalindrome string java programhow to check if string is a palindrome in javapalindrome in java using stackhow to create a palindrome in javawrite a java program to check whether the given number is palindrome or notmake a palindrome in javapalindrome number meaningcheck palindrome methodsjava determine if a string is palindromepalindrome no in javainteger palindrome in javapalindrom in a matrix javawrite a function in java pallindromehow to check if a number is palindrome in javaimplement a palindrom checker in javapalindrome number or not in javajava palindrome numbers within a rangepalindrome in string javapalindrom number in javapalindrome number java programpalindrome javapalindrome number ina range javapolyndrome in javacheck if the number is palindrome in javacode for palindrome string in javaflowchart to check if a number is palindrome or not in javaexplanation of solving palindrome javajava palindromepalindrome function javapalindrome java program stringjava palindrome using integerpalindrome in a string javafind all palindromes in a string javapalindrome in java for a stringperfect palindrome javawrite a program to check whether the given string is palindrome or not in javaplaindrome with reverse java example wirh scannerpalindrome number using for loop in javapalindrome function with numbers in javais palindrome method in javapalindrome using for loop in javahow to get palindrome of a int in javacheck if palindrome javahow to code palindrome in java10 write a palindrome program in javajava palindrome methodalogorithm in java to check whether a string is palindrome or notfind palindrome in string javawrite a program to check whether a given string is palindrome or not in javagenerate palindrome javapalindrome java codingfacepalindrome method in string class in javahow to get palindrome of a number in javapalindrome in given range javapalindrome number in java using stackcreate palindrome javajava check if input is palindromepaindrome of numbers javacheck the string is palindrome or not in javapossible palindrome integer in java palindrome program in javafind out prime palindrome numbers javapalindromecheck in javalalindrome in javais palindrome in javaispalindrome java codeimplement a program to check whether a given number is a palindrome javacheck the given name is palindrome or not in javajava is palindromepalindrome integers java softunicheck whether string is palindrome or not in javapalindrome in java using stringcheck number is palindrome or not in javapalindrome number in java using booleanpalindrome string javapalindrome checker in javanumber of palindrome string in javajava program to find palindromelongest palindrome program in javahow to check palindrome number in javalongest palindrome in a string javafind palindrome string in javajava program to check if a number is palindrome or notpalindrome string in java usingn arraysmake palindrome javahow to make a palindrome checker in javachecking string palindrome in javapalindrome javajprogram to check whether the number is palindrome or not in javajava palindrome stringjava program to find plaindromejava program given string is palindrome or notpalindrome string java codepalindromes javanumber palindrome in javajava code palindrome stringpalindrom program using javanumber is palidrome or nit in javaint palindrome in java using for looppalindrome number program in javais palindrome java while loopdetermine if a string is a palindrome javacheck if string of size n is palindrome javaprogram to find palindrome numbers between given range in javastring is palindrome on not in javanumber is palindrome or not in javahow to check the palindrome number in html using javadetecting palindromes in javapalindrome string with java 2fwrite a java program which read no from the user and check if this no is a palindrome or notpalindrome array in javabreak the palindrome in javapallindrome java codepalindrom java integerhow to check if a string is palindrome javapalindrome number checker javaanti palindrome string in javajava program to0 find palindrome numberswrite a program in java to find the number is palindrome or notpalimdeome metod in javajava integer palindromepalindrom a string in javawhat is palindrome javanumber is palindrome or not javajava ispalindromeadd palindrome math javahow to check if a word is palindrome in javahow to do palindrome javapalindrome of number add them together javahighest value palindrome in javahow to check the palindrome number in html using javafxpallindorme javacode for palindrome in javajava palindromes for spaceswrite a java program to find whether a string or number is palindrome or notpalindromenumber in javajava polindromenumber palindrone or not javafind the palindrome of size k and length n in javaispalindrome javajava program to check a palindrome numberalgorithm for palindrome in javacode for string palindrome in javapallindrome javacheck number palindrome program javacheck if string is palindrome javajava palindrome solution charatpalindrome of number in javajava diff way to do pallidromepalindrome in java using for loopjava multithreading program to find palindromejava palindrome given a string s is palindrome or notpalindrome test class java 60how to check string is palindrome or not in javahow to check the number is palindrome or not in java8palidrome javawrite a complete java program that will determine if a given number is a palindrome java program forpalindromemake palindrome method in javajava for palindromefinding palindromes javaprint palindrome in javapalindrome gfg javajava program to check whether number is palindrome or not palindrome number in jaanirmal wants to know the palindrome numbers between the given range of numbers help him by writing a java program to find the palindrome numbers write a java program to determine whether a given word is a palindrome or not how to check if number is palindrome using while loop in javathe palindrome game java solutionadvanced palindrome string question in jvacheck for palindrome algorithm javajava program palindromejava check plaindromepalindrome sort javaispalindrome for a number in javawrite a function to find out longest palindrome in a given string in javapalindrome in javapalindrome solution javacheck palindrome using stack in javapalindrome java programpalindromic prime number javapalindrome java palindeom code in javapalindrome no program in javapalindrome numnber in javanumber palindromehow to check if number is palindrome in javacreate function palindrome number in javapalindrom permutation javagiven string is palindrome number or not in javais it a palindrome in javapalindrome dll javajava program for palindrome number 10thhow to find anti palindrome in javaalgorithm for palindrome number in javapalindrome using stack javado palindrome string in javapalindromic numbers in jvastring palindrome in java codehow to compare palindrome in javawrite a method called palindrome 28 29 in javapalindrome number in java using while loopjava string palindrome programpalindrome program using while in javacheck a string is palindrome in javajava ispalindrome codepalindrom programmieren javahow to check if palindrome javauser input palindrome in javapalindrome in java rangepalindrome program in java 5cjava print a palindromepalindrome in javaajava program for palindrome numbernumber is a palindrome or not javapalindrome in javapalindrome word in javahow do you check if a given string is a palindrome in java 3fpalindrome using stack in javapalindromos en java check whether a string array is palindrome or not in javapalindrome integer in javajava program to check palindrome numbercheck palindrome number in javawhat is palindrome number in javaprime palindrome in range in javapalindrome questions javapallindrome number in javapalindrome number in java geeksforgeeks 5cjava program to check number is palindrome or notwrite a java program to check whether a number is palindrome or not palindrome words javachcek whether a number is a palindrome or not in javawrite a java program to find whether a string or number is palindrome or not palindrome number program javapalindrome or not javastring in java palindrome how to find palindrome javapalindrome check from reverse 28 29 in javahow to check if a string will be a palindrome in javafind all possible palindromes in a string in javajava palindrome checkerjava program makes palindromepalindrome code substring javapalindrome number using array in javapalindrome in java 8largest palindrome in string javapalindromes using javapolyndrom java codepalindrome program in java using for loopjava palindromicjava program to check whether a number is palindrome or not using functionpalindrome function in javacode to return a palindrome string in javajava find palindrome in stringmake a palindrom out of 4 number javapalindromeclass javalogest palindrome in javajava palindrome numberpalindrome of string in javawrite a string palindrome program in java palindrome words java programpalindrome method in java stringfind palindromes in javapalindromic numbers in javajava palindrome algorithmpalindrome between range javacheck word is palindrome program in javafind palindrome number in javapalindrom number in javajava palindrome programpalindrome of a number in javastring palindrome in java using reverse methodpalindrome java numberjava string palindrometest cases for palindrome number javapalindrome number in java geeksforgeekswrite a program to check whether a given string is palindrome or not javawhat is palindrome numberbest code for checking if a string is palindromeis palindrome java testpalindrome algorithm javapalindrome java intthe java code given below should find whether the number is a palindrome or not string palindrome code in javapalindrome in java programwrite a java program that checks whether a given string is a palindrome or not in javapalindrome method in code in javawrite a java program to find whether a string is palindrome or notpalindroom javapalindrome ajvapalindrome numberjava check palindrome numbercheck palindrome program javanumber is palidrome in java examplepalindrome examples in javafind all palindrome numbers between two numbers in javajava palyndromestring palindrome program in javacheck if number is a palindrome javapalindromic pattern in javapalindrome alphabet program in javajava palindrime checker codebest algorithm plaindrome javaa java palindrome programhow to find palindrome number in javais palindrome javacheck palindrom code fight javahow to find a palindrome number in javanumber is a palindrome javapalindrome test javajava program to check the string is palindrome or notpalindrome number in javahowto check if a string is a palindrome in javapalindrom in java programmierenjava is palindrome methodcommand line program to check if a number is palindrome or not in javapalindrome math java palindrome in java using booleanpalindrome phrases javapalindrome or not javais string a palindrome javapalindrome number checking methods in javapalindrome jacapalindrome java programestring palindrome javais palindrome string javajava program to read user input of a palindromehow to check palindrome of number using library function in javajava palindrome with looppalindrome method palindrome java stackjava palindrome number checkerpalindrome program in javachecking palindrome string in javapalindrome of number in java programstring palindrome in java using arraypaliindrime in javapalindrom javacheck the word ism palindrome javacheck palindrome javachecking a palindrome in javapal c3 adndromo java palindrome formula in javajava collections pallindromecheck if number is palindrome javawrite a java program to find if the given number is palindrome or notpalindromes examples java examplehow to write palindrome string java codehow to check if a number is palindrome javahow to initialize n for palindrome in javapalindrome number javastring palindrome in java 8what is palindrome in javafind given integer palindrom or not javacheck if array is palindrome javapalindromic dates program javabeeter algorithme to check palindrome javafunzione palindroma javapalindrome finder function javalongest possible palindrome in javarearrange numbers to form palindrome if possible in javapalindrome of a string in javahow to find the palindrome number in javajava swing program to check string is palindrome or noteasy palindrome program in javapalindrome java questionlongest palindrome in string javahow to check if a string is palindrome in javapalindrome number in java 3a palindrome numbers javacreate palindrome of size n in javato print all palindrome number in javajava program makes palindrome numberalindrom in javapalindrome words in javapalindrome in java stringpalindrome number code in javawrite a java program that checks whether a given string is a palindrome or not how to find next palindrome number in javapalindrome string using arrays javaidentify palindrome in javajava get total palindrome in stringhow to check palindrome array in java palindrome in javagiven a line print only those words which are palindrome in javaprint first n palindrome numbers in javastring palindrome in java using for loopfastest way to check a number is palindrome in javawrite a code to check a if string is palindrome java codenumber of palindrome subsequence in javapalindrome checker javapalindrome string complex java program using user inpujava polindrome interfaceinteger palindrome program in javapalindrome number using stack in javawrite a palindrome program in javafind longest palindrome substring in javaprogram to check palindrome word om javapalindrome numbers in given range in javaphrase palindrome in javapalindrome number check in javahow to check palindrome nuber javachecking if a number is a palindrome javaprogram to check palindrome number in javaif number is palindrome javapalindrome substring in javawrite a java program to find whether entered number is palindrome or notis palidrome in javacheck if a string is palindrome javapalindrome string in java codepalindrome numbers between the given range of numbers in javapalindromecutting 28s 29 in javatest if string is palindrome in javahow to find a palindrome in javajava rmi palindrome programalgorithm for string palindrome in javawhat is palindrome string in javafind method in array of palindrome in javahow to find a palindrom in ajava stringcheck integer palindrome javajava number palindromeplaindrome a string in javapalindrome number in java from 1 to 100 palindrome character wrapper class in java examplepalindrome number in java