-
Assume that we have to convert “false” that is a non-string to string. The command that we use is (without invoking the “new” operator)
-
- String newvariable=”false”
- Both false.toString() and String(false)
- String(false)
- false.toString()
- None of these
Correct Option: B
The three approaches for converting to string are: value.toString(),”” + value and String(value). A non-string can be converted in two ways without using a new operator false.toString () and String(false).