SWT301_-_PE_-_SP_2024_-_Block_5_1889.webp
Mai76

SWT301_-_PE_-_SP_2024_-_Block_5_1889.webp

  • Media owner Mai76
  • Ngày thêm
containing this information.
1
2
import java.util.HashMap;
public class Character Counter {
3@
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public static HashMap<String, Integer> countCharacters (String input) {
int upperCaseCount = 0;
int lowerCaseCount = 0;
int numericCount = 0;
int specialCharCount = 0;
for (char c input.toCharArray()) {
if (Character.isUpperCase(c)) {
upper CaseCount++;
} else if (Character.isLowerCase(c)) {
lowerCaseCount++;
} else if (Character.isDigit(c)) {
numericCount++;
} else {
specialCharCount++;
}
Zoom
+ 100%

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

Thông tin

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

Image metadata

Filename
SWT301_-_PE_-_SP_2024_-_Block_5_1889.webp
File size
165.1 KB
Dimensions
1374px x 993px

Share this media

Back
Bên trên Bottom