-
-
Notifications
You must be signed in to change notification settings - Fork 710
Update the introduction #2922
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
base: main
Are you sure you want to change the base?
Update the introduction #2922
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these changes look good. @kahgoh, any thoughts or feedback?
|
||
```java | ||
int explicitVar = 10; | ||
``` | ||
|
||
Updating a variable's value is done through the `=` operator. Once defined, a variable's type can never change. | ||
Updating a variable's value is done through the `=` operator. Here, `=` does not represent mathematical equality. It simply assigns a value to a variable. Once defined, a variable's type can never change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might more friendly if we just explain what =
does (not sure if the "mathematical equality" will be understood by everyone).
Updating a variable's value is done through the `=` operator. Here, `=` does not represent mathematical equality. It simply assigns a value to a variable. Once defined, a variable's type can never change. | |
The `=` operator assigns a value to a variable. It can also be used to update a variable's value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we have to make the distinction between the equals to and assigning operator clear though. I've seen people not really grasping the difference between them when they start out and they usually take it as a equals to sign.
Co-authored-by: Kah Goh <villastar@yahoo.com.au>
Co-authored-by: Kah Goh <villastar@yahoo.com.au>
pull request
This commit will:
Reviewer Resources:
Track Policies