Explain any five string methods?
Answer / Anupam Kumar Gautam
1. length(): Returns the length of a string.n2. substring(start, end): Extracts a part of the string from the specified index range.n3. toUpperCase()/toLowercase(): Converts the entire string to upper or lower case respectively.n4. trim(): Removes leading and trailing whitespaces from a string.n5. replace(oldChar, newChar): Replaces all occurrences of an old character with a new one.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is Scala Statically-Typed Language?
What is Range in Scala? How to create a Range in Scala?
Explain the difference between function and method in scala?
Explain recursion through a program?
What is a nexted function in scala?
How to implement interfaces in Scala?
What is repl in scala?
What is a singleton object in scala?
What is a Companion Object in Scala? What is a Companion Class in Scala? What is the use of Companion Object in Scala?
What is the difference between :: and #:: in Scala? What is the difference between ::: and #::: in Scala?
What are the Popular Scala-Based Frameworks to develop RESTful Web Services or REST API?
What are streams in scala?