public static void main(String args[]) {
版String str = "12&32&位置&yutye";
System.out.println("&在字符串中出现的权位置分别为:");
for(int i=-1; i<=str.lastIndexOf("&");++i)
{
i=str.indexOf("&",i);
System.out.print(i+"\t");
}
}

  • vicky    2020-05-09 10:54:50
  • 阅读 711    收藏 0    回答 1
  • 邀请
  • 收藏
  • 分享
发送
登录 后发表评论
  • 51testing软件测试圈微信