Duke CPS 100E - What can you put into an Array List (4 pages)

Previewing page 1 of 4 page document View the full content.
View Full Document

What can you put into an Array List



Previewing page 1 of actual document.

View the full content.
View Full Document
View Full Document

What can you put into an Array List

73 views


Pages:
4
School:
Duke University
Course:
Cps 100e - Programming Design and Analysis II
Programming Design and Analysis II Documents

Unformatted text preview:

What can you put into an ArrayList Anything that derives from Object String ArrayList Counter int double char boolean NO What can we do if want a collection of int values Put an upper bound on the count and use array int index 0 int a new int HUGE NUMBER while if condition a index value CompSci 100E 5 1 What can you put into an ArrayList Use a wrapper class see java lang int double char boolean Integer Double Character Boolean ArrayList list new ArrayList while if condition list add new Integer value int a new int list size for int k 0 k list size k a k Integer list get k intValue CompSci 100E 5 2 What is a char Differences between unicode and ASCII Why is unicode used Why should we care What should we know How many of the details are important A char value can be treated like a 16 bit int value Add integer to it cast back to char Subtract character from it get int back counters z s charAt k Anatomy of the statement above CompSci 100E 5 3 Lydia Kavraki Awards Grace Murray Hopper Brilliant 10 I like to work on problems that will generally improve the quality of our life What s the thing you love most about science Working with students and interacting with people from diverse intellectual backgrounds Discovery and the challenge of solving a tough problem especially when it can really affect the quality of our lives I find the whole process energizing CompSci 100E 5 4



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view What can you put into an Array List and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view What can you put into an Array List and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?