1. Engineering
  2. Computer Science
  3. 12 select the correct answer what is the output of...

Question: 12 select the correct answer what is the output of...

Question details

12. Select the correct answer. What is the output of the following code? importjava.util.ArrayList public class List Test public static void noBanana(ArrayList<String inList) { for (String str: inList) if (str.equals(banana)) { System.out.printin(str); return public static void main(String[i args) ArrayList<String> fruit new ArrayList<String>); fruit.add(banana; fruit.add(banana); fruit.add(banana); fruit.add(banana); fruit.add(orange); noBanana(fruit); orange banana fruit str noBanana

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution