Can I type -- switch ( int age = 36)? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Can I type -- switch ( int age = 36)?

A brief code

17th Jun 2019, 7:03 PM
Faisal Alghamdi
Faisal Alghamdi - avatar
2 Respostas
+ 4
no, you can't do that, the value need to be assigned before use inside switch and not assign inside switche
17th Jun 2019, 7:10 PM
āœ³AsterisKāœ³
āœ³AsterisKāœ³ - avatar
+ 1
Thanks a lot
18th Jun 2019, 7:36 PM
Faisal Alghamdi
Faisal Alghamdi - avatar