identify the correct usage of the advanced for loop? Assume that 'myarray' is an array having some 'double' type values.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

identify the correct usage of the advanced for loop? Assume that 'myarray' is an array having some 'double' type values.

Post by answerhappygod »

identify the correct usage of the advanced for loop? Assume that'myarray' is an array having some 'double' type values.
1) for(double value=:myArray){
System.out.println(value);
}
2). for(double value=0;myArray.length()-1){
System.out.println(value);
}
3). for(double value =0:myArray){
System.out.println(value);
}
4). for(double value:myArray){
System.out.println(value);
}
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply