Hello everyone,
I am new to Javaranch and this is my first posting. Actually, I wanted to report a possible error in RHE.
On page 117, Fig:4.10 (Table) Row 4, Column 3, it is stated that casting from an interface to an array is compilation error. In the table of Fig4.9 (about convertion rules), it is stated that convertion from an array to an interface is legal provided that the interface should be Serialzable or Cloneable. I thought if "converting" from an array to an interface is legal then logically "casting" in the opposite direction should also be legal. I tested as follows and the code compiled.
Sorry, if this is already reported. But I could not find it in the erreta page of RHE.
Ali
I am new to Javaranch and this is my first posting. Actually, I wanted to report a possible error in RHE.
On page 117, Fig:4.10 (Table) Row 4, Column 3, it is stated that casting from an interface to an array is compilation error. In the table of Fig4.9 (about convertion rules), it is stated that convertion from an array to an interface is legal provided that the interface should be Serialzable or Cloneable. I thought if "converting" from an array to an interface is legal then logically "casting" in the opposite direction should also be legal. I tested as follows and the code compiled.
Sorry, if this is already reported. But I could not find it in the erreta page of RHE.
Ali