Q42.webp
Đ

Q42.webp

Kizspy Question: 42
(Choose 1 answer)
What is the output of the following code snippet?
Map<Character, Integer> map = new TreeMap();
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.keySet());
A. ['e','h','','o']
B. ['h','o','e','l']
C. ['e','o', 'h','']
D. ['h','e','','o']

Thông tin

Category
PRO192
Thêm bởi
Đức Thành1
Ngày thêm
Lượt xem
1,371
Lượt bình luận
8
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom