Results 1 to 7 of 7
  1. #1
    Lund01's Avatar
    Lund01 is offline Senior Member
    Join Date
    Sep 2010
    Location
    The Netherlands
    Posts
    149
    Rep Power
    0

    Default Where does he print this certain line?

    I made this program, that works almost fine.
    But I can't get through why he prints a certain line 2 times...
    (This is another program that in my other topic, these just needs to make something individual.)

    Input file:
    >Contig1
    ACTGACTGGTACT
    >Contig1
    ACTGCCTGGTACT

    The output I get is:

    >Virus_Contig1
    ACTGACTGGTACT
    >Virus_Contig1
    >Virus_Contig1B
    ACTGCCTGGTACT

    But I want to get rid of that red line.
    He is not supposed to print that...

    I think the blue part of the code is the problem in it.

    Java Code:
     
    xD
    Last edited by Lund01; 11-18-2010 at 02:01 PM. Reason: Keeping my code.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,889
    Rep Power
    8

    Default

    Put in a ton of print statements, or better yet, step through the program with a debugger, to figure out what's going on.

  3. #3
    Lund01's Avatar
    Lund01 is offline Senior Member
    Join Date
    Sep 2010
    Location
    The Netherlands
    Posts
    149
    Rep Power
    0

    Default

    Found the problem. :D
    The line was always TRUE.

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,889
    Rep Power
    8

    Default

    So why remove your code? Perhaps you could have helped somebody with a similar question in the future.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default

    Last edited by Lund01; Today at 06:31 PM. Reason: Keeping my code.
    Oh. so you come to a forum only to get and never to give, huh? I'll remember you and I'm sure Kevin will too. And all the helpful forum regulars who come across this.

    I see this isn't the first time you've done this.
    printWriter problem
    Java Code:
    DoNotHelpList.add(Lund01);
    db

  6. #6
    Lund01's Avatar
    Lund01 is offline Senior Member
    Join Date
    Sep 2010
    Location
    The Netherlands
    Posts
    149
    Rep Power
    0

    Default

    To avoid copy paste programming.
    And if anyone asks help on this forum, I know how to help the out.
    So I can respond still.

  7. #7
    Lund01's Avatar
    Lund01 is offline Senior Member
    Join Date
    Sep 2010
    Location
    The Netherlands
    Posts
    149
    Rep Power
    0

    Default

    Dude, I worked a week on this code.
    You know how nasty it is when people come and take you code and say it is theirs?
    I had this thing on school when I showed some other student to get ideas, he sended my code in like it was his (with a few minor changes). And it costed me a lot of trouble to get the teacher to know I was the one who programmed it. And I did not copy paste my code.

Similar Threads

  1. print every other line
    By welikedogs in forum New To Java
    Replies: 23
    Last Post: 11-16-2010, 05:40 PM
  2. print to the next line
    By bar in forum New To Java
    Replies: 14
    Last Post: 07-15-2010, 01:48 AM
  3. Print to next Line
    By singularity in forum New To Java
    Replies: 13
    Last Post: 09-10-2009, 09:03 AM
  4. print line
    By kazitula in forum Java Applets
    Replies: 2
    Last Post: 01-26-2008, 02:05 PM
  5. how to print output on same line in 'while loop'?
    By acidblue in forum New To Java
    Replies: 5
    Last Post: 12-13-2007, 02:30 AM

Posting Permissions

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