Join Peggy Fisher for an in-depth discussion in this video Understanding arrays, part of Up and Running with Java.
- If you wanted to write an application…that is used to keep track of all items…on a grocery list, this is easy…when there's only a few items.…But what if you need to buy 100 items…or even more than 100.…Then you would need at least 100 string variables…just for the name of the items…and another 100 double variables…for the price of each item…because it would include both the dollars and cents.…So it includes the fractional portion.…As you can see, this is getting pretty complicated fast.…As you guessed it, there is a better way.…
We can use a special type of data structure…called an array.…This is a tool used in most programming languages…that allows us to store and work with multiple values…of the same data type using a single variable name.…The values in the array are stored…in consecutive memory locations.…The syntax for creating an array…is data type, such as int, or double, character, string.…Then you use a open square bracket…and a close square bracket.…The square brackets are what indicate…to the computer that it's an array.…
- 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.