Task 3 Use the NetBeans Project Name: Project1Task3 You do not need to use an MV
ID: 3533405 • Letter: T
Question
Task 3 Use the NetBeans Project Name: Project1Task3 You do not need to use an MVC framework for this project. Write another web application using NetBeans. This application will determine if a string entered into a browser is a palindrome. A string is a palindrome if it is empty, has a single character, or reads the same when reading from left to right or from right to left. Name your servlet Palin.java. Use an appropriate doctype for an Android mobile. Download and install the Android simulator from Google. Use the browser on the simulator to visit this web application. Produce a screen shot showing the simulator working on your web application. Note:
Explanation / Answer
I have successfully executed without any errorsimport java.util.*;public class CheckPalindrome{public static void main(String[]args){Scanner input=new Scanner(System.in);System.out.print("Enter String: ");String st=input.next();String str[]=st.split("");String reversedSt="";for(int i=str.length-1;i>=0;i--){ reversedSt+=str[i];}if(st.equalsIgnoreCase(reversedSt)){System.out.println("String is palindrome");}else{System.out.println("String is not palindrome");}}}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.