Q44.webp
N

Q44.webp

Question: 44
(Choose 1 answer)
What is the output of the following code snippet?
Map Character, Integer> map = new HashMap();
String data "hello";
for (Character c: data.toCharArray()) {
if (map.containsKey(c)) {
map.put(c, map.get(c) + 1);
} else {
map.put(c, 0);
}
System.out.println(map.get('L'));
A. 1
B. 2
C. O
D. 3

Thông tin

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

Share this media

Back
Bên trên Bottom