









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Intro to Programming II
Department of Computer Science — University of San Francisco – p. 1/
Department of Computer Science — University of San Francisco – p. 2/
Department of Computer Science — University of San Francisco – p. 4/
[]array
=^ new
int[5]; for^ (i^
=^ 0;^ i <
5;^ i++)
array^
=^ i;
new^ int[10]; for^ (i^
=^ 0;^ i <
5;^ i++)
array2[i]
=^ array1[i];
=^ array2;
Department of Computer Science — University of San Francisco – p. 5/
Department of Computer Science — University of San Francisco – p. 7/
Department of Computer Science — University of San Francisco – p. 8/
Department of Computer Science — University of San Francisco – p. 10/
index^
=^ band.indexOf(‘‘ringo’’) band.remove(index)
Department of Computer Science — University of San Francisco – p. 11/
Department of Computer Science — University of San Francisco – p. 13/
al^ =^
new^ ArrayList
al.add("john");al.add("paul");al.add("george");al.add("ringo");String^
name^ = al.get(2); System.out.println(name);
Department of Computer Science — University of San Francisco – p. 14/
Department of Computer Science — University of San Francisco – p. 16/