Scala Char getDirectionality() method with example Improve Improve Like Article Like Save Share Report The getDirectionality() method is utilized to return byte which indicates the directionality property of the char value. Method Definition: def getDirectionality: Byte Return Type: It returns byte. Example: 1# // Scala program of getDirectionality() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying getDirectionality() method val result = ('7').getDirectionality // Displays output println(result) } } Output: 3 Example: 2# // Scala program of getDirectionality() // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying getDirectionality() method val result = 'B'.getDirectionality // Displays output println(result) } } Output: 0 Last Updated : 03 Nov, 2019 Like Article Save Article Previous Scala Int isValidChar() method with example Next Scala Char ==(x: Long) method with example Share your thoughts in the comments Add Your Comment Please Login to comment...