Programming Scala by Dean Wampler and Alex Payne

Programming Scala by Dean Wampler and Alex Payne

Author:Dean Wampler and Alex Payne
Language: eng
Format: epub, pdf
ISBN: 9781491949856
Publisher: O’Reilly Media, Inc.
Published: 2015-06-15T00:00:00+00:00


trait PureAbstractTrait { def abstractMember(str: String): Int } abstract class AbstractClass { def concreteMember(str: String): Int = str.length def abstractMember(str: String): Int }

Note

Traits with abstract members don’t have to be declared abstract by adding the abstract keyword before the trait keyword. However, classes that are abstract, where one or more member is undefined, must be declared abstract.

To expand on the fifth note, because observers is mutable, the following two expressions are equivalent:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.