Salesforce Free Developer >

Chapter 2 - Apex Datatypes and Operators >

Enums in APEX

Enums in APEX

An enum is an abstract datatype with values that each take on exactly one of the finite set 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.

Ex:

Public enum season(winter, summer, spring, fall); 

Season s=season.winter; // define it into a new file to make it global

System.debug(s);

Download Study Material

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

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 *