javadoc wrote:Consumable. The elements of a stream are only visited once during the life of a stream. Like an Iterator, a new stream must be generated to revisit the same elements of the source.
Alexandros Collie wrote:You misspelled superman in line 8.
But why does not superString add new Object as the generic type says "? super String" and Object is super of String.
Swapna latha wrote:I havenot understood clearly. As per Kathy Sierra and Bert Bates ocp book , ? extends IOException means anything that extends IOException , so we can have even an Exception right. Why Java is not allowing it ? Am i wrong in understanding the concept. Whats the use of Right hand side of the expression which has generic type of Exceptionn .