why the primitive data type have classes?

Answer Posted / ranganathkini

All of Java's primitive data types have an associated
Wrapper class. These wrapper classes provide useful
functions such as conversion or comparisons most of which
are used by Java implicitly.

Also a wrapper serves as a container for primitive values in
conditions where a reference type is expected.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a line separator in java?

749


What is 32 bit float?

766


What does i ++ mean in Java?

722


What is an object class?

774


Is vector thread safe in java?

781


What is stringbuffer in java?

818


Distinguish between a predicate and a function?

775


What is a prefix function.write down a code to compute prefix function.

784


Why do we need singleton class?

752


How do you use substring in java?

780


What is bom encoding?

779


What is a singleton class in Java?

744


What is a static method in java?

774


What are advantages and disadvantages of OOPs?

875


Can a lock be acquired on a class in java programming?

736