Scala Int <(x: Int) method with example
The <(x: Int) method is utilized to return true if the specified first int value is less than the second int value, otherwise returns false.
Method Definition: (First_Int_Value).<(Second_Int_Value)
Return Type: It returns true if the specified first int value is less than the second int value, otherwise returns false.
Example #1:
// Scala program of Int <(x: Int) // method // Creating object object GfG { // Main method def main(args : Array[String]) { // Applying Int <(x: Int) function val result = ( 100 ). < ( 110 ) // Displays output println(result) } } |
chevron_right
filter_none
Output:
true
Example #2:
// Scala program of Int <(x: Int) // method // Creating object object GfG { // Main method def main(args : Array[String]) { // Applying Int <(x: Int) function val result = ( 50 ). < ( 10 ) // Displays output println(result) } } |
chevron_right
filter_none
Output:
false
</div
Recommended Posts:
- Scala Set map() method with example
- Scala Set last() method with example
- Scala Int <=(x: Int) method with example
- Scala Int %(x: Int) method with example
- Scala Int ==(x: Int) method with example
- Scala Map max() method with example
- Scala | map() method
- Scala Set &() method with example
- Scala Int -(x: Int) method with example
- Scala Map min() method with example
- Scala Set take() method with example
- Scala Set sum() method with example
- Scala Set +() method with example
- Scala Set -() method with example
- Scala Set contains() method with example
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.