Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

enhance for loop java


public class Sample {
    public static void main(String[] args) {

        String roles[] = { "admin", "customer", "cashier", "manager" };
        // for (int x = roles.length - 1; x > -1; x--) {
        //     System.out.println(roles[x]);
        // }
        for (String n : roles) {
            System.out.println(n);
        }
    }

}
Comment

PREVIOUS NEXT
Code Example
Java :: Implementation of TreeMap Class in Java map 
Java :: check if LinkedList is empyth java 
Java :: module java.base does not "opens java.io" to unnamed module 
Java :: how to merge two arrays in java 
Java :: hwo to create a list of 1 to n nums in java list 
Java :: how to copy an object in java 
Java :: boolean operators in java 
Java :: java session timeout 
Java :: treemap java entryset 
Java :: java inner method 
Java :: enable cors on apache tomcat 
Java :: java exponencial 
Java :: java stack verification failed 
Java :: byte array in java 
Java :: width and height of screen java 
Java :: indexof list java 
Java :: how to call a static method in java 
Java :: null java 
Java :: Could not resolve project :app 
Java :: djava days between two dates 
Java :: Traversing through java map foreach 
Java :: string array to string stream java 
Java :: call by value and call by reference in java 
Java :: double to int 
Java :: java how to split a string to array 
Java :: constructor of class that extends another class 
Java :: switch in java 
Java :: switch java 
Java :: declaring java variables 
Java :: arraylist methods in java 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =