package com.test;
import java.util.Scanner;
//反转字符串
public class test_6 {
public static void main(String[] args) {
// TODO Auto-generated method stub
String max="1234532234343";
String min="2";
int count =0;
int index =0;
while((index = max.indexOf(min)) != -1) {
count++;
max = max.substring(index+min.length());
}
//System.out.println(count);
}
}