SWT301_-_FALL24_-_PE4_3276.webp
fragrant_flower

SWT301_-_FALL24_-_PE4_3276.webp

Zoom
4
int upperCaseCount = 0;
5
int lowerCaseCount = 0;
6
int numericCount = 0;
7
int specialCharCount = 0;
8
9
10
11
12
13
14
15
16
} else {
17
for (char c input.toCharArray()) {
if (Character.isUpperCase(c)) {
upper CaseCount++;
} else if (Character.isLowerCase(c)) {
lower CaseCount++;
} else if (Character.isDigit(c)) {
numericCount++;
specialCharCount++;
18
}
19
}
20
21
HashMap<String, Integer> character Counts = new HashMap<>();
22
character Counts.put("UpperCase", upperCaseCount);
23
character Counts.put("LowerCase", lowerCaseCount);
24
character Counts.put("Numeric", numericCount);
25
character Counts.put("SpecialCharacter", specialCharCount);
26
27
return character Counts;
28
}
29
}
100%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
SWT301_-_FALL24_-_PE4_3276.webp
File size
183.3 KB
Dimensions
1920px x 803px

Share this media

Back
Bên trên Bottom