Scala Char |(x: Char) method with example
Last Updated :
29 Oct, 2019
The |(x: Char) method is utilized to find the bit-wise OR of the stated character value and given ‘x’ in the argument list.
Method Definition: def|(x: Char): Int
Return Type: It returns the bit-wise OR of the stated character value and given ‘x’.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = 'A' .|( '1' )
println(result)
}
}
|
Example: 2#
object GfG
{
`
def main(args : Array[String])
{
val result = 'A' .|( 'A' )
println(result)
}`
}
|
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...