📅  最后修改于: 2022-03-11 14:55:38.977000             🧑  作者: Mango
String str = "Game of Thrones";
//This will print "true" because "Game" is present in the given String
System.out.println(str.contains("Game"));
/* This will print "false" because "aGme" is not present, the characters
* must be present in the same sequence as specified in the contains method
*/
System.out.println(str.contains("aGme"));