Advertisements
Advertisements
Question
valueOf() function converts ______.
Options
Primitive type to String
String to primitive type
Character to String
None
MCQ
Fill in the Blanks
Solution
valueOf() function converts string to primitive type.
Explanation:
Java's valueOf() function converts primitive types (such as int, float, and double) to their String representation. A String class method converts a primitive type or object into a string.
shaalaa.com
Is there an error in this question or solution?