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