Computer Science, asked by amanpreet84, 9 months ago

Which wrapper class can not be used to convert string to primitive type​

Answers

Answered by aish2804
0

Answer:

hey pal! here's your answer. pls mark my answer as the brainliest and follow me .

Explanation:

A Wrapper class is a class whose object wraps or contains primitive data types. When we create an object to a wrapper class, it contains a field and in this field, we can store primitive data types. In other words, we can wrap a primitive value into a wrapper class object.

Need of Wrapper Classes

They convert primitive data types into objects. Objects are needed if we wish to modify the arguments passed into a method (because primitive types are passed by value).

The classes in java.util package handles only objects and hence wrapper classes help in this case also.

Data structures in the Collection framework, such as ArrayList and Vector, store only objects (reference types) and not primitive types.

An object is needed to support synchronization in multithreading.

Primitive Data types and their Corresponding Wrapper class.

*HOPE IT HELPS YOU*

Attachments:
Similar questions