CS 1301 – Ch 6, Handout 1

ArrayList ints = new. ArrayList(Arrays. asList (3,6,2,5,7,9)); int. val = getRandom (ints); Section 19.4 – Generic Methods – Bounded Types: In the generic method above we don’t know anything about the class of . E . so we can’t call any methods on . E. More often when we write generic methods, we will . bound. the type of the generic parameter. We can use the . extends ... ................
................