|
home—info—labs—hws—exams
textbook—java.lang docs—java.util docs—archive
A way of keeping track of a whole bunch of data.
Task:
Handy tip: here's a method which will create a list for you, which instead of being initially empty, it initally holds whatever arguments you pass in1: java.util.Arrays.asList(3.3, 4.4, 5.5)
1Note that if you pass in Doubles, you'll get an List<Double>. If you pass in (say) booleans, they'll get auto-boxed into their wrapper class Booleans and asList will create a List<Boolean>. All good and fair. But what if we pass in zero input, as in Arrays.asList() -- what type of list to we get back? Uh-oh! Try it. ↩
home—info—labs—hws—exams
textbook—java.lang docs—java.util docs—archive
©2008, Ian Barland, Radford University Last modified 2008.Nov.10 (Mon) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |