• sree r 25
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hallo everyone,

 

I want to write a switch-case block the convention in Java  is:

 

switch( variable)

{

case value:

statement;

break;

case value:

statement;

break;

default

statement;

break;

}

 

or is it different in Apex because I get an exception.


Save error: unexpected token: '{'    after switch(variable).

 

  • April 23, 2012
  • Like
  • 0