Scala Int getClass() method with example Last Updated : 30 Jan, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report The getClass() method is utilized to return the class of the given int number. Method Definition: (Number).getClass Return Type: It returns the class of the given number. Example #1: Scala // Scala program of Int getClass() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying getClass method val result = (2).getClass // Displays output println(result) } } Output: int Example #2: Scala // Scala program of Int getClass() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying getClass method val result = (27987696).getClass // Displays output println(result) } } Output: int Comment More infoAdvertise with us Next Article Scala Float getClass() method with example K Kanchan_Ray Follow Improve Article Tags : Scala Scala Scala-Method Similar Reads Scala Char getClass() method with example The getClass() method is utilized to return the run-time class representation of the stated object. Method Definition: def getClass(): Class[Char] Return Type: It returns the class of the stated object. Example: 1# Scala // Scala program of getClass() // method // Creating object object GfG { // Mai 1 min read Scala Float getClass() method with example The getClass() method is utilized to return the class of the given number. Method Definition: (Number).getClass Return Type: It returns the class of the given number. Example #1: Scala // Scala program of Float getClass() // method // Creating object object GfG { // Main method def main(args:Array[S 1 min read Scala Map get() method with example The get() method is utilized to give the value associated with the keys of the map. The values are returned here as an Option i.e, either in form of Some or None. Method Definition:def get(key: A): Option[B] Return Type: It returns the keys corresponding to the values given in the method as argument 2 min read Scala Int hashCode() method with example The hashCode() method is utilized to return hash value of the specified int value. Method Definition: def hashCode(): Int Return Type: It returns hash value of the specified int value. Example #1: Scala // Scala program of Int hashCode // method // Creating object object GfG { // Main method def mai 1 min read Scala List length() method with example The length() method is utilized to find the length of the list. Method Definition: def length: Int Return Type: It returns the length of the list stated. Example: 1# Scala // Scala program of length() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Creating 1 min read Scala Char >(x: Int) method with example The >(x: Int) method is utilized to find if the stated character value is greater than 'x' or not. And the type of 'x' must be Integer. Method Definition: def >(x: Int): Boolean Return Type: It returns true if the stated character value is greater than "x" else it returns false. Example: 1# Sc 1 min read Like