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

Fix unused variable warnings #32

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix unused variable warnings #32

wants to merge 3 commits into from

Conversation

phrdang
Copy link
Member

@phrdang phrdang commented Jul 1, 2021

Locations

  • Ch. 2 Output
    • 2.1 What is a string?
  • Ch. 3 Data
    • 3.1 Primitive Types
  • Ch. 4 Operators
    • 4.1 Arithmetic Operators
    • 4.2 Augmented Assignment Operators
  • Ch. 9 Arrays
    • 9.2 Declaring and Initializing Arrays
  • Ch. 12 Classes and Inheritance
    • 12.6 Basic UML Diagrams
    • 12.10 Wrapper Classes

Changes

  • Suppress unused variable warnings on Variables.java, FirstHalf.java, WithoutEnd.java, Initialize.java, InitializeArray.java, and Account.java
  • Print results of operators usage on Arithmetic.java and AugmentedAssignment.java

Note

  • FirstHalf.java and WithoutEnd.java are supposed to be practice problems on Notion but for some reason aren't there? Someone please add them!

@phrdang phrdang requested a review from JJ27 July 1, 2021 21:17
Copy link
Contributor

@JJ27 JJ27 left a comment

Choose a reason for hiding this comment

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

I left one comment @phrdang but if we don't need to accommodate that you can just merge it.

@@ -4,21 +4,27 @@

public static void main(String[] args) {
// addition
int a = 5 + 1; // a has the value 6
int a = 5 + 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we still keep the comment?

Suggested change
int a = 5 + 1;
int a = 5 + 1; //a has value 6

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I deleted the comments because if you run the program the results are printed anyway (I added print statements).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants