编辑代码

class jw {
	public static void main(String[] args) {
    String str1="I am Tom,I am from China";
    String str2="Tom";
    if(str1.equals(str2))
      System.out.println("是在一个字符串");
      else
      System.out.println("不在一个字符串");
    }
}