Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

primitive vs wrapper classes in java


					Differences: 
				1. Wrappers classes are object 
				2. null can only be assigned to classes
				3. Wrapper class does have methods
				4. Primitives does have default values
						default value of primitives:  
								 byte, short, int, long ==> 0
								 float, double ==> 0.0;
								 boolean ==> false;
								 char ==> space		 
				5. Default values of wrapper class: null
 
PREVIOUS NEXT
Tagged: #primitive #wrapper #classes #java
ADD COMMENT
Topic
Name
6+3 =