public static void main(String[] args) {
String s="上海传智播客,上海黑马,武汉传智播客,深圳黑马,北京传智播客,广州黑马,北京黑马";
int i=(s.length()-s.replace("传智播客","").length())/4;
System.out.println("传智播客出现"+i+"次");
int j=(s.length()-s.replace("黑马","").length())/2;
System.out.println("黑马出现"+j+"次");
}