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

Potential typo in section 1.6.2.2 #27

Open
nevthemountie opened this issue Sep 16, 2024 · 0 comments
Open

Potential typo in section 1.6.2.2 #27

nevthemountie opened this issue Sep 16, 2024 · 0 comments

Comments

@nevthemountie
Copy link

I don't think that the following line of code (which is the same as the line shown in section 1.6.2.2) will run, either by itself or in conjuction with "int[] numbers;" :

numbers = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024};

I think the aforemention line of code will fail to run on its own (because we will then be neglecting to declare numbers as an array of ints) or with "int[] numbers;" (I tried to do a similar thing and I recieved an "illegal start of expression" error).

However, from my tinkering, I believe that the following line of code will run:

int[] numbers = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024};

It will be nice if my conjecture can be verified, with the course notes potentially changing to reflect that. Thanks!

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

No branches or pull requests

1 participant