|
Computer Science (CSCI)
Department |
|||
|
|||
Arrays
(Example code and figures from Computing Concepts with Java Essentials,
3rd edition, by Cay Horstmann.
Visit www.wiley.com/college/horstmann
for information on the current edition of this excellent text.)
new double[10] |
double[] data = new double[10]; |
data[4] = 29.95; |
double[] data = new double[10]; |
double[] prices = (double[])data.clone(); |
System.arraycopy(from, fromStart, to, toStart, count); |
ArrayList coins = new ArrayList(); |
Double wrapper = new Double(29.95); double unwrapped = wrapper.doubleValue() ArrayList data = new ArrayList(); data.add(wrapper); unwrapped = ((Double)data.get(i)).doubleValue(); |