Skip to main content

Enum Types

  • Chapter
  • First Online:
Beginning Java 9 Fundamentals
  • 2292 Accesses

Abstract

An enum (also known as enumeration and enumerated data type) lets you create an ordered list of constants as a type. Before we discuss what an enum is and why we need it, let’s consider a problem and solve it using Java features that were available before enum, which was introduced in Java 5.

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 39.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

© 2017 Kishori Sharan

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Sharan, K. (2017). Enum Types. In: Beginning Java 9 Fundamentals. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2902-6_22

Download citation

Publish with us

Policies and ethics