ONE DAY SALE

Free Salesforce Developers Tutorials >

Chapter 3 - Apex Datatypes and Operators >

Enums in APEX

Enums in APEX

What You’ll Learn


S2 Labs

What Is Enum In Apex?

An enum is an abstract datatype with values that each take on exactly one of the finite sets of identifiers that you specify. Enums are typically used to define a set of possible values that don’t otherwise have a numerical order such as a suit of card or a particular season of the year.

Syntax Of Enum Data Type In Apex

public enum season{winter, summer, spring, fall}
Season s = Season.winter; // define it into a new file to make it global 
System.debug(s);

 

Salesforce Developer Training

Download Study Material

Get access to exclusive study material for Salesforce Certification and ace your exams!

Download Now

Our Salesforce Certification Courses

Hey there! Glad you made it through our Salesforce Developer Training for beginners . But wait! We've got some high-in-demand Salesforce courses for you to take your Salesforce skills to the next level, making you a desired professional in the Salesforce job market.

Post a Comment

Your email address will not be published. Required fields are marked *