Java Reference
In-Depth Information
No.
9 . Show how this sequence can be rewritten using the ? operator.
Here is the answer:
10 . In the following fragment, is the & a bitwise or logical operator? Why?
It is a logical operator because the operands are of type boolean .
11 . Is it an error to overrun the end of an array?
Yes.
Is it an error to index an array with a negative value?
Yes. All array indexes start at zero.
12 . What is the unsigned right-shift operator?
13 . Rewrite the MinMax class shown earlier in this chapter so that it uses a for-each style
for loop.
Search WWH ::




Custom Search