walk2() doesn’t compile because it is missing the braces around the empty method body.
You are already saw that there are four access modifiers: public, private, protected, and default access.
This method doesn’t compile because it only differs from the original by return type.
Rule 2 says to run the static variable declarations and static initializers – in this case, line 5 and 6, which output 0 and 10.
Maybe one of “that” is redundant.You want to write a method that that takes an age() method as input.
Java doesn’t require you type return or use a semicolon when no braces are used.
Maybe H should be h for case sensitive.We decide we want to remove all of the bunny names that don’t begin with the letter h because our little cousin really wants us to choose an H name.
Since Java is pass-by-reference, assigning a new object to a does not change the caller.
Option B is incorrect because it does not use the return keyword.
Additionally, option C is missing the return keyword and option E is missing the semicolon.
Mushfiq Mammadov wrote:1. On page 172, parentheses is missing:
...
Parentheses of walk2 method is missing.
Mushfiq Mammadov wrote:2. On page 173, access modifiers:
The first sentence of Applying Access Modifiers topic:
You are already saw that there are four access modifiers: public, private, protected, and default access.
Mushfiq Mammadov wrote:3. On page 192, return statement is missing:
...
If these would be valid overloading the second fly method does not still compile because the return statement is missing.
Mushfiq Mammadov wrote:4. On page 203, line 4 is missing:
In the third sentence:
Rule 2 says to run the static variable declarations and static initializers – in this case, line 5 and 6, which output 0 and 10.
“line 5 and 6” should be “line 4, 5 and 6”.
Mushfiq Mammadov wrote:5. On page 209, maybe “that” is redundant:
In the seventh line:
Maybe one of “that” is redundant.You want to write a method that that takes an age() method as input.
Mushfiq Mammadov wrote:6. On page 211, semicolon is redundant:
...
Semicolon is redundant here, because we can use semicolon only inside braces with together return statement.
7. On page 212, confused point:
...
There is no typo in this sentence but a bit confused. I understand this sentence as this: Java doesn’t require, so it is optional, we can type these if we want or not. But return and semicolon haven’t been to typed if there is no braces.
Maybe everything is ok but my English is not enough
Mushfiq Mammadov wrote:a) First paragraph, fifth sentence:
Maybe H should be h for case sensitive.We decide we want to remove all of the bunny names that don’t begin with the letter h because our little cousin really wants us to choose an H name.
Mushfiq Mammadov wrote:b)Third paragraph, second sentence:
Remember the one method in the interface called test()?
Maybe ? should be dot (.) .
Mushfiq Mammadov wrote:9. On page 344, mock explanation #17:
First sentence:
Since Java is pass-by-reference, assigning a new object to a does not change the caller.
Maybe it is typo, because we say Java always use pass-by-value.
Mushfiq Mammadov wrote:10. On page 346, mock explanation #29:
...
It would be good that adding “and semicolon” after the return keyword. Because it does not still compile if we add only return keyword.
Mushfiq Mammadov wrote:1. On page 172, parentheses is missing:
Mushfiq Mammadov wrote:2. On page 173, access modifiers:
The first sentence of Applying Access Modifiers topic:
You are already saw that there are four access modifiers: public, private, protected, and default access.
I downloaded java quiz from play market and I encountered the following question there:
“How many access modifiers are?”
My answer was four. But the correct answer was three. The explanation of that question was:
"There are four access level: public, private, protected and default access. But there are three access modifiers: public, private and protected".
Is it correct or not?
Mushfiq Mammadov wrote:3. On page 192, return statement is missing:
The second part example:
And then it is written:
This method doesn’t compile because it only differs from the original by return type.
If these would be valid overloading the second fly method does not still compile because the return statement is missing.
Mushfiq Mammadov wrote:4. On page 203, line 4 is missing:
In the third sentence:
Rule 2 says to run the static variable declarations and static initializers – in this case, line 5 and 6, which output 0 and 10.
“line 5 and 6” should be “line 4, 5 and 6”.
Mushfiq Mammadov wrote:5. On page 209, maybe “that” is redundant:
In the seventh line:
Maybe one of “that” is redundant.You want to write a method that that takes an age() method as input.
Mushfiq Mammadov wrote:6. On page 211, semicolon is redundant:
Lambda Syntax section, first example:
Semicolon is redundant here, because we can use semicolon only inside braces with together return statement.
Mushfiq Mammadov wrote:7. On page 212, confused point:
Third paragraph, fourth sentence:
Java doesn’t require you type return or use a semicolon when no braces are used.
There is no typo in this sentence but a bit confused. I understand this sentence as this: Java doesn’t require, so it is optional, we can type these if we want or not. But return and semicolon haven’t been to typed if there is no braces.
Maybe everything is ok but my English is not enough
Mushfiq Mammadov wrote:8. On page 215, H should be h:
Mushfiq Mammadov wrote:9. On page 344, mock explanation #17:
First sentence:
Since Java is pass-by-reference, assigning a new object to a does not change the caller.
Maybe it is typo, because we say Java always use pass-by-value.
Mushfiq Mammadov wrote:
10. On page 346, mock explanation #29:
First sentence:
Option B is incorrect because it does not use the return keyword.
Third sentence:
Additionally, option C is missing the return keyword and option E is missing the semicolon.
It would be good that adding “and semicolon” after the return keyword. Because it does not still compile if we add only return keyword.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Friends help you move. Good friends help you move bodies. This tiny ad will help:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|