Join Peggy Fisher for an in-depth discussion in this video Using ArrayLists, part of Up and Running with Java.
- You might have noticed that so far,…all the arrays had primitive data types stored in them.…Well, there's a reason for that.…Arrays can only hold primitive data types.…So we need a way to store objects in the same way.…This is where an ArrayList can really help.…Another benefit of an ArrayList…is that you could increase and decrease…the size dynamically, it's not a fixed size.…The downside if ArrayLists is they take up…a little bit more overhead.…So an array is a good choice…if you do know the size of your array…and you're only dealing with primitive data.…
Okay, let's talk about a realistic example.…Remember our real estate business?…It might be nice to keep track of many properties…without having to create new variables each time.…Instead, we can create an instance…of the property class and use an ArrayList…to store all of them together under one name.…Let's review the syntax for an ArrayList.…I have a new project started called, RealEstateMLS.…I'm gonna go ahead and add javautil.scanner,…just in case.…
- Downloading and exploring NetBeans
- Understanding Java basics: data types, strings, arrays, and more
- Controlling flow with functions and loops
- Creating classes
- Sorting and searching arrays
- Manipulating files
- Handling errors
- Building GUIs
Skill Level Beginner
1. Getting Started
2. Java Basics
3. Flow of Control
4. Classes and Objects
5. Beyond the Basics
6. File Manipulation
7. Graphical User Interface Basics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.