Pergunta de entrevista da empresa UKG

Given an main method which has arraylist initialized with the numbers 1,4,3,2, in that order, which then prints the array (using a combination of iterators and arraylist.get), print the numbers in order. The iterators and Lists were their own class files, which you were allowed to change. Hard to explain, but the solutions pretty obvious when looking at the code

Resposta da entrevista

Sigiloso

13 de fev. de 2013

I overrode whatever statement it was that printed to, instead of just iterating normally, find the next largest number to print 1-2-3-4. This was one of two ways they looked for, the other of which was overriding an iterator method.

2