Search
 
SCRIPT & CODE EXAMPLE
 

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 :(");
}
Comment

if statement with string java

if (var.equals("text"))
Comment

PREVIOUS NEXT
Code Example
Java :: boolean in java 
Java :: anagram java 
Java :: print all numbers from 1 to n java 
Java :: Hash map, Hash set and Hash Table difference 
Java :: scala vs java 
Java :: power-hungry foobar solution in java 
Java :: java read from file word by word 
Java :: spring convert page to list 
Java :: arrays.sum 
Java :: how to get string input line in java 
Java :: queue and stack reader 
Java :: initilize an array java 
Java :: Java How to use List? 
Java :: android studio reg get float from numeric string 
Java :: public static void main(String[] args) in java 
Java :: How to merge two sorted arrays into a single sorted bigger one? 
Java :: javafx edit list 
Java :: android studio hide linearlayout 
Java :: java do while loop example 
Java :: spring mvc project example 
Java :: string to char 
Java :: boolean 
Java :: how to run few methods of class after mockStatic 
Java :: how to develop web apps using java 
Java :: types of methods in java 
Java :: put arraylist in hashtable java 
Java :: java zahlen runden auf 1 nachkommastelle 
Java :: Read json url in android - NAYCode.com 
Java :: share location in android programmatically 
Java :: java calendar to date 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =