The semicolon (;) in Scala is –

6. The semicolon (;) in Scala is -

  1. Necessary, failing to write will not mark the end of line
  2. Not required, it is treated as a character
  3. Optional, end of the line does not require ;
  4. None of these

Answer: C) Optional, end of the line does not require ;

Explanation:

If the programmer puts a semicolon at the end of the line it's ok and if no semicolon is present even then too the compiler does not throw any error. Read more: Semicolons in Scala

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.