Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

What type of exception will the enum value of java throw?

Asked by Akansha Chawla Feb 7, 2023 1.5K views 1 answer
Share

About this question

In Winter 22 we are getting a long desired (if somewhat niche) feature: Use the valueOf() Enum Method to Convert a Specified String to an Enum Constant Value

The valueOf() enum method converts a specified string to an enum constant value. An exception is thrown if the input string doesn’t match an enum value. In previous releases, using this method resulted in a runtime error.


What type of exception specifically is thrown?

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.