what is wrapper class in java.

Discussion in 'JavaScript' started by bulochc83, Jul 9, 2010.

  1. #1
    suggest me.
     
    bulochc83, Jul 9, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Rainulf, Jul 9, 2010 IP
  3. bulochc83

    bulochc83 Peon

    Messages:
    260
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank u for your suggestion........
     
    bulochc83, Jul 14, 2010 IP
  4. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #4
    Mostly a wrapper class promotes primitive types to a class, so that methods could be performed, or added into hashmaps etc.

    You can't do this.
    int a = 6;
    a.toString();

    You can do this.
    Integer a = 6;
    a.toString();
     
    Kaizoku, Jul 15, 2010 IP