Enhance For Loop Java

[Solved] Enhance For Loop Java | Scala - Code Explorer | yomemimo.com
Question : enhance for loop java

Answered by : fernandez-jasmine-m

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); } }
}

Source : | Last Update : Wed, 30 Mar 22

Answers related to enhance for loop java

Code Explorer Popular Question For Scala