Skip to content
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
8 changes: 8 additions & 0 deletions src/integers/integer_literals.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ We call them this because the integer is literally written down in the program.
```java
int trueCrime = 789;
```

For longer literals, consider using underscores (i.e. '_') to separate parts of the number

```java
int oneMillion = 1_000_000;
```

This also works not just in decimal but also in binary, octal, and hexadecimal literals.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of these literal types have been mentioned at this point