What are wrapper classes?

Answer Posted / irshad ahmad

Wrapper classes are classes that are used to make primitive
data types into objects, and to make wrapped objects into
primitives because

As we know that vector in java can hold only object; but
can't directly store primitive data types, like int,float,
char, long, double. therefore we need to convert simple data
type to object. This can we done using wrapper classes.

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a vector contain heterogenous objects?

812


Can a class be private or protected in java?

806


What happens if a constructor is declared private?

804


What is Java Reflection API? Why it’s so important to have?

854


What are format specifiers in java?

823


How can we access some class in another class in java?

774


How are the elements of a gridbaglayout organized?

796


What is the driver class?

766


What is the difference between an argument and a parameter?

757


If goto and const is reserve words than why it is not work in java?

1759


Can a abstract class be declared final?

788


How do you sort arraylist in descending order?

790


What is the latest version of java?

806


What is the maximum size of a string in java?

762


What does += mean in java?

797