Fill in the blanks to make this code compile and print 123. (Choose all that apply.)
4: List<String> list = Arrays.asList("1", "2", "3"); 5: Iterator iter = list.iterator(); 6: while(iter.__________()) 7: System.out.print(iter._________());
hasNext()
.isNext()
.next()
.getNext()
.hasNext()
.next()
.A, F.
You have to memorize this.hasNext()
returns a boolean, and it is used in the loop.
next()
returns the next element.