Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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 :(");
}
 
PREVIOUS NEXT
Tagged: #string #variables #statement #java
ADD COMMENT
Topic
Name
5+4 =