
Wrapper Class in Java
Wrapper Class in Java
- Java offers for every primitive datatyes in wrapper classesin java.lang. package.
- To define the primitives we need to use the java predefined keywords was mandatory.
For Example:
The following keywords are avaialable in javaby using this keywords only you can define the primitives in java.
byte b=45; short s=78; int i=89; long l=787878887L; float f=78.78F; double d=78787.90D; char ch=’M’; String emp_Name=”Welcome”; boolean flag=false; |
Imp Note:
For every wrapper class can return primitives only.
For Example:
1.public static final byte MAX_VALUE(it will return the primitive type byte value) 2.public static final short MAX_VALUE(it will return the primitive type short value) 3.public static final int MAX_VALUE(it will return the primitive type int value) |