Write a Java program to check String is Palindrome or not. || Java Programming Tutorials

Publié le: 18 avril 2021
sur la chaîne: Learning and Teaching Coding
9,778
161

- A palindrome string is a string that is same after reverse.

- This Java program asks the user to provide a string input and checks it for the Palindrome String.

- Scanner class and its function nextLine() is used to obtain the input, and println() function is used to print on the screen.

- Scanner class is a part of java.util package, so we required to import this package in our Java program.

- We also required to create an object of Scanner class to call its functions.

- To check if a string is a palindrome or not, a string needs to be compared with the reverse of itself.

Consider a palindrome string: wow,
---------------------------
index: 0 1 2
value: w o w
---------------------------
#LearningandTeachingCoding
#JavaProgrammingTutorials
#JavaPrograms


Sur cette page du site, vous pouvez voir la vidéo en ligne Write a Java program to check String is Palindrome or not. || Java Programming Tutorials durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Learning and Teaching Coding 18 avril 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 9,778 fois et il a aimé 161 téléspectateurs. Bon visionnage!