PRO192_-_PE04_-_FA_2023_1303.webp
G

PRO192_-_PE04_-_FA_2023_1303.webp

getReversestring(s: String):String-return the reverse string of the string s
countDigitsInString(s:String):int - return the number of the digits in the string s
Hints: you can use the isDigit() method of Character class to check whether a character is a digit or not and charAt() method to get a character in the string
The program output might look something like this:
1.Test getReverseString()
1.Test getReverseString()
2.Test countDigitsInString()
2.Test countDigitsInString()
Enter TC(1 or 2):1
Enter TC(1 or 2):2
Enter the string:hello
Enter the string:abc 123 hello
OUTPUT:olleh
OUTPUT:3
Zoom
+ 100%
Close

Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRO192_-_PE04_-_FA_2023_1303.webp
File size
44.2 KB
Dimensions
1552px x 652px

Share this media

Back
Bên trên Bottom