Results 1 to 6 of 6
  1. #1
    JavaPilot is offline Member
    Join Date
    Feb 2009
    Posts
    1
    Rep Power
    0

    Default parseInt() vs. intValue()

    Hi All,

    I am VERY new to JAVA and could sure use some help with a question: what is the difference between the parseInt() and intValue() methods (besides one being a static method and the other being an instance method)?

    Thanks in advance!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,309
    Blog Entries
    1
    Rep Power
    32

    Default

    more important than the differences are their similarities: both can be found in the Integer API: Integer (Java Platform SE 6)

    You'll also find descriptions here of precisely what these methods do.

    Good luck!

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,370
    Blog Entries
    1
    Rep Power
    26

  4. #4
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    12

    Default

    parseInt does not have the overhead of creating an Integer object, which is useful if you are wanting to parse *lots* of int's.

  5. #5
    davejay is offline Member
    Join Date
    Jan 2009
    Posts
    9
    Rep Power
    0

    Default

    hello everyone i am having a doubt regarding the file transfer using java..could anyone help me out to clearout the problem.. advance thx..

  6. #6
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    12

    Default

    jay, don't hijack someone's thread. It causes confusion. can you start a new one and ask again.
    USE CODE TAGS--> [CODE]...[/CODE]
    Get NotePad++ (free)

Similar Threads

  1. Integer.parseInt?
    By Exhonour in forum New To Java
    Replies: 4
    Last Post: 01-20-2009, 02:31 AM
  2. Replies: 11
    Last Post: 01-10-2009, 02:16 AM
  3. Problem with Integer.parseInt()
    By Hevonen in forum New To Java
    Replies: 2
    Last Post: 12-14-2008, 03:41 AM
  4. [SOLVED] Command Line Arguments and ParseInt
    By Sophiie in forum New To Java
    Replies: 4
    Last Post: 11-16-2008, 09:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •