读入一行字符串(不多于 800 个字符,以回车结束),统计其中 Bubble 出现了多少次。
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
/
package javaapplication12;
import java.util.Scanner;
/**
@author H7x
/
public class JavaApplication12 {
/**
w = s.charAt(i);
if(w=='B'){
int j,k;
for(j = 0,k = i;j<6;j++,k++){
e = s.charAt(k);
r = str.charAt(j);
if(e!=r);
break;
}
if(j==6)
num++;
}
}Bubble is ajdaod
0
怎么正确输出Bubble有几个呀
Char w; Listsss=new ArrayList(); for(int i=0;i