登录
首页 » Java Develop » multiinterfaces.zipgbuffer Searchme =新的StringBuffer(

multiinterfaces.zipgbuffer Searchme =新的StringBuffer(

于 2023-04-21 发布 文件大小:672.00 B
0 63
下载积分: 2 下载次数: 1

代码说明:

multiinterfaces.zipgBuffer searchMe = new StringBuffer( "peter piper picked a peck of pickled peppers") int max = searchMe.length() int numPs = 0 for (int i = 0 i < max i++) { //interested only in p s if (searchMe.charAt(i) != p ) continue //process p s numPs++ searchMe.setCharAt(i, P ) } System.out.println("Found " + numPs + " p s in the string.") System.out.println(searchMe) } } -multiinterfaces.zipgBuffer searchMe = n ew StringBuffer ( "peter piper picked a peck of p ickled peppers ") searchMe.length max = int () i nt = 0 numPs for (int i = 0 i

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 104271会员总数
  • 57今日下载