Scala String toUpperCase() method with example
Last Updated :
29 Oct, 2019
The toUpperCase() method is utilized to convert all the characters of the stated string to uppercase.
Method Definition: String toUpperCase()
Return Type: It returns the resultant string after converting its all the character to uppercase.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = "GeeksforGeeks" .toUpperCase()
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = "nid#!" .toUpperCase()
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...