Skip to main content

Classes and Functions

  • Chapter
  • First Online:
Scala for Java Developers
  • 1656 Accesses

Abstract

How anonymous classes differ from anonymous functions.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 24.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 32.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Lambdas are called using the invokedynamic bytecode. It’s more efficient than generating new classes and instantiating them as is the case for anonymous classes.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Toby Weston

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Weston, T. (2018). Classes and Functions. In: Scala for Java Developers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3108-1_10

Download citation

Publish with us

Policies and ethics