首页
it技术
登录
6mi
u
盘
搜
搜 索
it技术
如何使用Stream判断一个字符串相同字符的个数
如何使用Stream判断一个字符串相同字符的个数
it
2025-07-21
10
如何使用Stream判断一个字符串相同字符的个数
@Test
public
void
test01
(
)
{
String str
=
"asdsadasdassd"
;
System
.
out
.
println
(
Stream
.
of
(
str
.
split
(
""
)
)
.
filter
(
s
-
>
s
.
equals
(
"a"
)
)
.
count
(
)
)
;
}
转载请注明原文地址: https://lol.8miu.com/read-27694.html
最新回复
(
0
)