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: meaning of this java code

  1. #1
    Junior Member
    Join Date
    Aug 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default meaning of this java code

    int i_loop_count=1;

    log.info("i_loop_count in log: " + i_loop_count);
    log.info("Total Count : ${cEMPID_matchNr}");

    String tempstr = vars.get("cEMPID_matchNr");
    log.info("tempstr in log: " + tempstr);

    int total_count = Integer.parseInt(tempstr);
    log.info("total_count in log: " + total_count);

    tempstr="";
    log.info("tempstr in line 14: " + tempstr);

    String finalstr="";
    log.info("finalstr in line 17: " + finalstr);

    while (i_loop_count <= total_count)
    {
    log.info("In line 21:");
    tempstr = vars.get("cEMPID_" + i_loop_count);
    log.info("In line 24:");
    log.info("count - " + i_loop_count + " loop str - " + tempstr);
    log.info("In line 27:");
    finalstr=finalstr+tempstr;
    log.info("substr - " + finalstr);
    log.info("In line 31:");

    if(i_loop_count < total_count)
    {
    log.info("In line 35:");
    finalstr= finalstr.concat(",");
    }
    i_loop_count++;
    }
    log.info("In line 39:");
    log.info("final string - " + finalstr);

    vars.put("EmpList",finalstr);

    i_loop_count = 0;
    int i_iterate = 0;

    if (total_count <= 100)
    {
    i_iterate = 1;
    }
    else
    {
    int i_rem = total_count % 100;
    int i_quo = total_count / 100;

    if ( i_rem == 0)
    {
    i_iterate = i_quo;
    }
    else
    {
    i_iterate = i_quo++;
    }
    }

    log.info("60 : Iterative Counter - " + i_iterate);

    String str1 = Integer.toString(i_iterate);

    vars.put("Iterate_Count",str1);

  2. #2
    Member
    Join Date
    Aug 2017
    Location
    Northern Ireland
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: meaning of this java code

    Do you have a question about the code? Where does the code come from?
    Tim Driven Development

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,381
    Thanks
    53
    Thanked 2,397 Times in 2,350 Posts

    Default Re: meaning of this java code

    Please edit your post and wrap your code with code tags:

    [code]
    **YOUR CODE GOES HERE**
    [/code]

    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Meaning of code? & possibility for shortening?
    By krnaveen14 in forum Java Theory & Questions
    Replies: 2
    Last Post: February 3rd, 2014, 05:02 AM
  2. Replies: 1
    Last Post: July 8th, 2012, 10:23 AM
  3. The meaning behind it
    By unleashed-my-freedom in forum Java Theory & Questions
    Replies: 4
    Last Post: July 4th, 2012, 08:57 PM
  4. Meaning of Java Packages
    By Effrego in forum Java Theory & Questions
    Replies: 1
    Last Post: February 5th, 2011, 04:18 PM
  5. the meaning of 'instanceof'
    By Abednego Setyawan in forum Object Oriented Programming
    Replies: 1
    Last Post: March 12th, 2010, 12:45 AM