Skip to main content

Constants, Variables, and Data Types

  • Chapter
Learn Swift on the Mac
  • 1561 Accesses

Abstract

In OOP languages, an immutable object is an object whose state can’t be modified. Swift calls these constants. Once a constant object has been created and an initial value assigned, it can’t be changed. In contrast, an object whose value can be changed is a mutable object. Swift calls these variables.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Waqar Malik

About this chapter

Cite this chapter

Malik, W. (2015). Constants, Variables, and Data Types. In: Learn Swift on the Mac. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0376-7_5

Download citation

Publish with us

Policies and ethics