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

Why spring singleton is not thread safe?

564


Should a main method be compulsorily declared in all java classes?

534


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread

596


Why are the methods of the math class static?

580


Explain notifyall() method of object class ?

664






why Interface used?

537


How does varargs work in java?

611


What is the difference between variable & constant?

541


What is core java called?

524


Is string a class in java?

511


How are destructors defined in java?

573


What is java thread dump, how can we get java thread dump of a program?

571


What are sets in java?

507


What is contract between hashcode and equal method?

566


when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???

1672