用indexOf("\""),indexOf("\n")就可以啊

解决方案 »

  1.   

    public class string1 {
    public boolean IncludeEnter(String str) {
    boolean blnRtn = false;
    if (str.indexOf("\n") >= 0) {
    blnRtn = true;
    } return blnRtn;
    } public static void main(String args[]) {
    string1 str;
    String strMsg; str = new string1();
    if (str.IncludeEnter("asdfjk;\nfjdksa;fd")) {
    strMsg = "yes";
    }
    else {
    strMsg = "no";
    } // if System.out.println(strMsg);
    }
    }
    我写的一个测试回车的,自己稍加修改,就可以了。=================一代过去,一代又来,地却永远长存。日头出来,日头落下,急归所出之地。
    风往南刮,又往北转,不住的旋落,而且返回转行原道,江河都往海里转,海
    却不满,江河从何处流,仍归何处。