In this video, Doug Winnie shows how to create a collection of values using an array. Then Doug shows how to work with individual values in the array after it is created using bracket notation and the element index number.
- Arrays are collections that can…group objects together under a single name.…In Java, arrays can hold objects of the same type,…which is different than other programming languages.…To create an array, you start by providing…the type of the value that the array will hold.…Then you add an opening and closing bracket.…Then you assign multiple values to the array…after you give that array a name.…First, you need to say that you're…creating a new typed array.…Then start with an opening curly brace,…and enter the first value.…
In this case, I'll create a string.…Then, separate each value with a comma.…Close with a second curly brace,…and then a semicolon.…This array has four elements,…and each element has an index number…that we can use to access each element.…The first element is zero.…So the string, "Doug," is element zero…in the array named myArray.…There are multiple ways we can access an array.…You can access the entire collection…of values as a single set.…
Or, you can pinpoint specific items inside of it.…To send to the console,…
- The history of Java
- Setting up your development environment
- Working with values and variables
- Using methods and functions
- Capturing user input
- Creating conditional tests
- Using loops
- Creating and changing arrays
- Object-oriented programming in Java
- Defining permissions
- Extending classes
Skill Level Beginner
Computer Science Principles: The Internetwith Doug Winnie59m 30s Beginner
Java Essential Training for Studentswith Peggy Fisher3h 6m Intermediate
1. Intro to Java
2. Define Actions Using Code
3. Repeat Actions and Test for Conditions
4. Object-Oriented Programming Basics
Next steps1m 44s
- 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.