Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting edit in 01-introduction-to-java.md #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 01-introduction-to-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ With arrays, we have some special syntax that looks a bit different. This syntax
numbers = new int[5];
```

An array object now exists on the heap, has 5 spots, each spot can hold an `int` and has the default value `0`, and the variable numbers refers to the whole object.
An array object now exists on the heap, has 5 spots, each spot can hold an `int` and has the default value `0`, and the variable `numbers` refers to the whole object.

In this case, we have defined the size of the array at the time we wrote the code. It is also possible to determine the size of the array when the program is running, either by reading it from the input or by computing it from other values. This is because the size of the array is not part of its type. The type of our array `numbers` above, for instance, is simply `int[]`; we can assign any `int` array, of any length, to it.

Expand Down