如题!

解决方案 »

  1.   

    public boolean contains(CharSequence s)
      

  2.   

    System.out.println("sdfdfsaf*dfddf".indexOf("*"));
      

  3.   

    public class Test {
        public static boolean check(String str, String s) {
         if(str.indexOf(s) >=0){
         return true;
         }
         else{
         return false;
         }
        }
        public static void main(String[] args) {
         System.out.println(check("sdfdfsaf*dfddf","*"));
        }
    }
      

  4.   

    if(str.indexOf("*") !=-1){
      //todo
    }