Given the following array: import java.util.*; String[] fruits = {Apple, Mango, Pear, Banana, Cherry}; a. Write a
Fantastic news! We've Found the answer you've been seeking!
Question:
Given the following array:
import java.util.*;
String[] fruits = {"Apple", "Mango", "Pear", "Banana", "Cherry"};
a. Write a for loop to loop through the array and print out each fruit on a separate line in an ascending order. b. Write a for-each loop to loop through the array and print out each fruit on a separate line in an ascending order.
Related Book For
Posted Date: