Map<String, Double> last = updateStockPrices(stocks);
for (int i=0; i<symbols.length; i++) {
Double newPrice = stocks.get( symbols[i] );
if ( newPrice == null ) {
throw new DelistedException(symbols[i]);
}
else {
Double oldPrice = last.get( symbols[i] );
prices[i] = updatePrice(symbols[i], oldPrice, newPrice);
}