Here you can find the source of contains(String str1, String str2)
public static boolean contains(String str1, String str2)
//package com.java2s; public class Main { public static boolean contains(String str1, String str2) { return str1 != null && str1.contains(str2); }// ww w. j ava 2s .com }