Scala short <=(x: Int): Boolean Last Updated : 05 Dec, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report Short, a 16-bit signed integer (equivalent to Java's short primitive type) is a subtype of scala.AnyVal. The <=(x: Int) method is utilized to return true if this value is less than or equal to x, false otherwise. Method Definition: def <=(x: Int): Boolean Return Type: It returns true if this value is less than or equal to x, otherwise false. Example #1: Scala // Scala program of Short <=(x: Int) // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying Short <=(x: Int) function val result = (998.toShort).<=(999:Int) // Displays output println(result) } } Output: True Example #2: Scala // Scala program of Short <=(x: Int) // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying Short <=(x: Int) function val result = (102.toShort).<=(101:Int) // Displays output println(result) } } Output: false Comment More infoAdvertise with us S Shivam_k Follow Improve Article Tags : Scala Scala Scala-Method Similar Reads Learn Free Programming Languages In this rapidly growing world, programming languages are also rapidly expanding, and it is very hard to determine the exact number of programming languages. Programming languages are an essential part of software development because they create a communication bridge between humans and computers. No 9 min read Scala Programming Language Scala is a general-purpose, high-level, multi-paradigm programming language. It is a pure object-oriented programming language which also provides support to the functional programming approach. Scala programs can convert to bytecodes and can run on the JVM (Java Virtual Machine). Scala stands for S 3 min read Scala Tutorial â Learn Scala with Step By Step Guide Scala is a general-purpose programming language that combines both object-oriented and functional programming. Designed for scalability and flexibility, it allows developers to write concise and maintainable code for everything from small scripts to large enterprise systems. First released in June 2 15+ min read Introduction to Scala Scala is a general-purpose, high-level, multi-paradigm programming language. It is a pure object-oriented programming language which also provides the support to the functional programming approach. There is no concept of primitive data as everything is an object in Scala. It is designed to express 7 min read Scala | flatMap Method In Scala, flatMap() method is identical to the map() method, but the only difference is that in flatMap the inner grouping of an item is removed and a sequence is generated. It can be defined as a blend of map method and flatten method. The output obtained by running the map method followed by the f 4 min read For Loop in Scala In Scala, for loop is also known as for-comprehensions. A for loop is a repetition control structure which allows us to write a loop that is executed a specific number of times. The loop enables us to perform n number of steps together in one line. Syntax: for(w <- range){ // Code.. } Here, w is 6 min read Scala vs Java Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented, etc. Java applications are compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture. Scala is a general-purpose, high-level, multi-paradigm program 2 min read Scala Console | println, printf and readLine Console implements functions for displaying the stated values on the terminal i.e, with print, println, and printf we can post to the display. It is also utilized in reading values from the Console with the function from scala.io.StdIn. It is even helpful in constructing interactive programs. Let's 2 min read Hello World Program : First program while learning Programming In this article, I'll show you how to create your first Hello World computer program in various languages. Along with the program, comments are provided to help you better understand the terms and keywords used in theLearning program. Programming can be simplified as follows: Write the program in a 6 min read How to Install Scala with VSCode? Scala is a multi-paradigm, general-purpose, high-level programming language. It is an object-oriented programming language that also supports functional programming and it is easy to use. Its applications can be converted to bytecodes and executed on the Java Virtual Machine (JVM) (Java Virtual Mach 2 min read Like