RU beehive logo ITEC dept promo banner
ITEC 120
2008fall
aaray,
ejderrick,
ibarland,
jmdymacek

homeinfolabshwsexams
textbookjava.lang docsjava.util docsarchive

lect10c
lists, cont

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.      

homeinfolabshwsexams
textbookjava.lang docsjava.util docsarchive


©2008, Ian Barland, Radford University
Last modified 2008.Nov.10 (Mon)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme