Whats the problem in this code ? when i run this code it give the correct output but verification fails ?
package com.codegym.task.task08.task0801;
/*
HashSet of plants
*/
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
HashSet<String> s = new HashSet<String>();
s.add("watermelon");
s.add("banana");
s.add("cherry");
s.add("pear");
s.add("cantoloupe");
s.add("blackberry");
s.add("ginseng");
s.add("strawberry");
s.add("iris");
s.add("potato");
Iterator<String> itr = s.iterator();
while(itr.hasNext())
{
String text = itr.next();
System.out.println(text);
}
}
}