Skip to content

Conversation

@ds2643
Copy link
Contributor

@ds2643 ds2643 commented Nov 13, 2024

This commit fixes a very minor typo in the java (English) tutorial.

  • I solemnly swear that this is all original content of which I am the original author
  • Pull request title is prepended with [language/lang-code] (example [python/fr-fr] or [java/en])
  • Pull request touches only one file (or a set of logically related files with similar changes made)
  • Content changes are aimed at intermediate to experienced programmers (this is a poor format for explaining fundamental programming concepts)
  • If you've changed any part of the YAML Frontmatter, make sure it is formatted according to CONTRIBUTING.md
    • Yes, I have double-checked quotes and field names!

This commit fixes a very minor typo in the `java` (English) tutorial.

// Text blocks
vat textBlock = """
var textBlock = """
Copy link
Contributor Author

@ds2643 ds2643 Nov 13, 2024

Choose a reason for hiding this comment

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

The previous section introduces var, which allows for type inference. To my knowledge, vat isn't valid Java:

jshell> vat textBlock = "invalid";
|  Error:
|  cannot find symbol
|    symbol:   class vat
|  vat textBlock = "invalid";
|  ^-^

Code snippet above is executed in jshell running on openjdk/11.

@verhovsky verhovsky merged commit 33e4598 into adambard:master Nov 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants