1、如何随机产生0-100的数(要有一位小数)
2、判断一个字符串“welcome”是否含有字符子串“come”

解决方案 »

  1.   

    2))
    public boolean contains(CharSequence s)当且仅当此字符串包含 char 值的指定序列时,才返回 true。 
      

  2.   

    1.Math.round(Math.random()*1000+10)*0.1
    2.String a="welcome";
    String b="come";
    if(a.indexOf(b)!=0)System.out.println("true");
      

  3.   

    Math.round(Math.random()*1000+10)*0.1好家伙,很少用random
      

  4.   

    虽然math类很少用(数学软件除外)  但是math.random()经常用  
      

  5.   

    Math.round(Math.random()*1000+10)*0.1welcome.contains("come")
      

  6.   

    Math.round(Math.random()*1000+10)*0.1  那个+10是什么意思??