Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
tableswitch
:
Content language: English
Русский
@switch annotatition
tableswitch
What will be printed into the console? val Constant = 'Q' def tokenMe(ch: Char) = (ch: @switch) match { case ' ' | '\t' | '\n' => 1 case 'A' | 'Z' | '$' => 2 case '5' | Constant => 3 case _ => 4 } println(tokenMe('5'))
tableswitch
← Prev
1
Next →
Sign Up Now
or
Subscribe for future quizzes