2. import java.io.*;
3.
Zoom
4. class Checkstringsymmetry {
5.public static void main(String[] args) {
6.System.out.print("Please enter the character string you want to check:");
7.Scanner in-new Scanner(System.in);
8.String inputString in.nextLine();
9.int length inputString.length();
10.Stack stack new Stack();
11.
for (int i=0; i < inputString.length()1; 1++) {
12.stack.push(inputString.charAt(i));
13.}
14.String reverseString = "";
15.
16.while (!stack.isEmpty()) {
17.
reverseString stack.pop();
}
18.
19.if (inputString.equals(reverseString))
20.
System.out.println("This is a symmetric character string.")
21.else
22.System.out.println("This is not a symmetric character string.");
23.}
24. }
Question 2 (3 points): Assuming you are assigned to conduct the component test for the method
+ 107%
Close