Q:

Java if string in variable

very new to java, but I can't seem to find how to do this in java..
var1 = "testing101"
if("101" in testing) balala

How do I do in, in java?
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;

public class Main {
    public static void buttonPressed(String[] args) {

        WebDriver driver = new ChromeDriver();
        driver.get("http://www.csgodouble.com/index.php");
        WebElement rollingTimer = driver.findElement(By.xpath("//*[@id=\"banner\"]"));
        if(rollingTimer :: "Rolling in 41")

    }
}

this is how I thought it was done..

A:

If you trying to see if a string contains a sub string:
String var1 = "testing101"
if(var1.contains("101"))

