QuestionQ181Verified/Variables and ArgumentsCopy linkReport a problemAsk AstroTutorSave questionWhich syntax correctly checks whether the String variable StrVar contains the word "robot"?AStrVar. Equalsf("robot")B"robot".Substring(StrVar)CStrVar.Contains("robot")DStrVar.Substring("robot")Show AnswerAnswerExplanationThe String.Contains method tests whether a string includes the specified substring and returns a Boolean result.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion