Wrapper Class
                                               Wrapper classes                Java is an Object oriented programming language so represent everything in the form of  the object, but java supports 8 primitive data types these all are not part of object.  To represent 8 primitive data types in the form of object form we required 8 java classes  these classes are called wrapper classes.  All wrapper classes present in the java.lang package and these all classes are immutable classes.     Wrapper classes hierarchy                Wrapper classes Constructor          Integer i = new Integer(10);  Integer i1 = new Integer("100");  Float f1= new Float(10.5);  Float f1= new Float(10.5f);  Float f1= new Float("10.5");  Character ch = new Character('a');                datatypes      wrapper-class       constructors          byte       Byte      byte,String          short      Short      short,String           int      Integer      int,String           long      Long  ...
 
Comments
Post a Comment