if (var.equals("text"))
class Main {
public static void main(String[] args) {
// create a string variable
String language = "Java";
// if statement
if (language == "Java") {
System.out.println("Best Programming Language");
}
}
}