Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

using condition for each loop


public class Sample {
    public static void main(String[] args) {
        String names[] = { "Jasmine", "Lyka", "Marbie", "Soleen", "Tiny" };
        for (String name : names) {
            if (name.equalsIgnoreCase("Soleen")) {
                System.out.println("We found " + name);
            } else {
                System.out.println(name);
            }
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: char array substring java 
Java :: java completablefuture chain 2 operations 
Java :: google intent for directions 
Java :: war file in java 
Java :: Java double Keyword 
Java :: non access modifiers in java 
Java :: apache poi excel color 
Java :: pioneer meaning 
Java :: check is element present in queue java 
Java :: convert text file into binnary format bitmap using java 
Java :: add days to a date java 
Java :: for loop in how to call class in android studio 
Java :: exemple javafx 
Java :: array remove duplicate in java 
Java :: scrollbar in textarea java 
Java :: bufferedreader 
Java :: how to replace a character with another character in a string in java 
Java :: java string stringbuilder remove trailing comma 
Java :: Calculate weeks from date using java 
Java :: java generate random string and number 
Java :: Exception in Application start method java.lang.reflect.InvocationTargetException 
Java :: Vowel or consonant in java using if else 
Java :: multiple root tags android manifest 
Java :: grepper mcm java 
Sql :: foreign key set 0 
Sql :: postgresql create table default value timestamp 
Sql :: Failed to stop mysqld.service: Unit mysqld.service not loaded. 
Sql :: grant revoke privileges to mysql username 
Sql :: sql get missing id 
Sql :: query to list all tables in sql database 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =