Results 1 to 2 of 2
  1. #1
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    114
    Rep Power
    0

    Default Parsing Problem !

    I'm converting String to Integer in two cases:

    Case 1:
    int zID1=Integer.parseInt(zone_id);
    System.out.println(zID1);

    Case 2:
    int sqNum1=Integer.parseInt(squad_no);
    System.out.println(sqNum1);

    Case 1 is working fine and Case 2 is not working at all, why?Could anyone help?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default Re: Parsing Problem !

    Case 2 is not working at all
    Please post the full text of the error message.
    What is the contents of the squad_no variable? Is it valid input for the parseInt method?

Similar Threads

  1. Having a problem with parsing
    By kaizen9001 in forum New To Java
    Replies: 2
    Last Post: 03-26-2011, 03:13 AM
  2. Problem in parsing text
    By holy.water in forum New To Java
    Replies: 11
    Last Post: 02-19-2011, 05:19 PM
  3. String Parsing Problem
    By jamess in forum New To Java
    Replies: 3
    Last Post: 12-06-2010, 09:59 AM
  4. Problem with string parsing.
    By dc0m in forum New To Java
    Replies: 5
    Last Post: 08-31-2010, 06:25 PM
  5. parsing problem
    By Pooja Deshpande in forum Advanced Java
    Replies: 4
    Last Post: 05-29-2008, 01:59 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
  •