- What is the Scala equivalent to the C question mark?
What is the Scala equivalent to the C question mark?
return a > b ? a : b // Return the max
return if (a > b) a else b
Copyright © 2008-2021, dave. Code samples on Dave's Brain is licensed under the
Creative Commons Attribution 2.5 License.
other material, including English text has all rights reserved.