SWT301_-_SP_2024_-_PE1_1578.webp
F

SWT301_-_SP_2024_-_PE1_1578.webp

  • Media owner Fu841
  • Ngày thêm
to do the test.
Zoom
All the answers must be written in the provided template file, in Enghlish and reflect this exam paper. If your answers to the questions in this exam paper have any keywords not related to this electronic exam paper, the answers to the questions will get ZERO. If you do not use the provided template file to answer the exam you take today, your exam will get ZERO.
Question 1 (3 points): Review the following class and find (at least) 6 issues in the code (i.e,coding practice, compile errors, potential logical issue, etc.) (Use question 1 template)
1. import java.lang.*;
2. import java.io.*;
3.
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.

+ 107%
Close
Chưa có bình luận nào.

Thông tin

Category
SWT301
Thêm bởi
Fu841
Ngày thêm
Lượt xem
3,168
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
SWT301_-_SP_2024_-_PE1_1578.webp
File size
248.6 KB
Dimensions
1920px x 803px

Share this media

Back
Bên trên Bottom