Answers for "how to write if statements for strings in java"

1

how to use string variables with an if statement in java

String a = "Hello"

if (a.equals("Hello") {
	System.out.println("Variable A is Hello");
} else {
	System.out.println("Variable A is not hello :(");
}
Posted by: Guest on August-13-2020
0

if statement with string java

if (var.equals("text"))
Posted by: Guest on January-15-2021

Code answers related to "how to write if statements for strings in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language