Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: convert int to String

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default convert int to String

    for(int i = 0; i < mBucket.size(); i++)
    {
    c = (String) mBucket.get(0);
    a = Integer.toString(c);
    }

    mBucket is an arrayList and what the for loop is doing is retrieving the first element in mBucket and going to convert it to an int. What I'm running into is that the method is not applicable for the argument (String). Any suggestions to help me fix this?


  2. #2
    Junior Member
    Join Date
    Oct 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: convert int to String

    Integer.parseInt(STRING NAME) Maybe?

  3. #3
    Junior Member
    Join Date
    Oct 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: convert int to String

    yeah, slipped my mind haha. thanks!

Similar Threads

  1. [SOLVED] convert String to int
    By b109 in forum Java Theory & Questions
    Replies: 3
    Last Post: June 3rd, 2010, 03:05 AM
  2. How to convert a String into an Hexadecimal ?
    By lumpy in forum Java Theory & Questions
    Replies: 2
    Last Post: February 16th, 2010, 04:01 PM
  3. Conversion of string into integer in Java
    By JavaPF in forum Java Programming Tutorials
    Replies: 17
    Last Post: January 23rd, 2010, 08:33 AM
  4. Conversion of string into integer in Java
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 17
    Last Post: January 23rd, 2010, 08:33 AM
  5. Convert string to int?
    By connex in forum Java Theory & Questions
    Replies: 1
    Last Post: December 9th, 2009, 04:06 AM