Why does this print a null?

I have a snippet here that prints one row from a derby DB. The heading row works fine.
I
            while (!cells[0].isEmpty()) {
                for (int col = 0; col < colNames.length; col++) //System.out.print(cells[col].remove(0).toString() + "\t");
                    queryResult += cells[col].remove(0).toString() + "\t";
                    //System.out.print(cells[col].remove(0).toString() + "\t");
                System.out.println("");results to Output window are:
IDNUM        KANJI        KANA        ROMAJI        ENGLISH       
null1        &#24859;        &#12354;&#12356;        ai        love    I should mention that the string "queryResult" is passed out as a return value and printed to output (not shown).
Example 2, I do the same thing with a direct println to Output:
            while (!cells[0].isEmpty()) {
                for (int col = 0; col < colNames.length; col++) //System.out.print(cells[col].remove(0).toString() + "\t");
                    //queryResult += cells[col].remove(0).toString() + "\t";
                    System.out.print(cells[col].remove(0).toString() + "\t");
                System.out.println("");Results are:
IDNUM        KANJI        KANA        ROMAJI        ENGLISH       
1        &#24859;        &#12354;&#12356;        ai        love       
nullAgain we get a null, but this time its at the end!
Running the query in SQL using the Netbeans interface shows no null, nor does examining the table.
How am I introducing a null in here?
Thanks

I don't know, but the results are a little funky. Perhaps the query results contains some control characters, like a carriage return and a null-terminator (\r and \0)? You could check this by not printing the string, but by printing the ASCII code of each individual character.

Similar Messages

  • HP Photosmart C8180 Printer! WHY does this keep happening every day??

    I have only had this for 3 months and it already has problems.
    It keeps telling me its out of paper when it is not.
    i always have at least 20 sheets in there!
    You can hear the rollers going but it can't pick up the paper and I only use high quality A4 paper in there.
    i then have to pull the tray out and push it back in, and yes i have the paper inserted in there correctly
    also, sometimes when i get this "out of paper" message, i ignore it and just press OK and it works fine 
    why does this keep happening?
    this is disgusting coming from a Quality brand like HP
    think its time to go to BBC Watchdog! 
    A printer is an item meant to print. 
    It is generally helpful if a printer recognizes such out-of-the-ordinary, eccentric, unheard-of media such as...oh, I dunno, 8.5 x 11-inch PAPER?????
    It claims repeatedly to have run out of paper. No paper. No paper. Insert paper into paper tray. Now, granted, the minimalist quality of the paper tray--it holds 20 pages, roughly--might convince you that I had indeed used up all my paper; this is not the case. 18 of the 20 sheets are still there. So I readjust that paper, close the tray. It starts to pull in a piece of paper, and then there is the giant crunchy noise of a paper jam in progress. And forget about “easy access” for removing them, either.
    In the months I have had this printer, I don’t believe it has EVER allowed me to print five pages consecutively without some sort of problem.  To me, this is known as an EPIC FAIL. 
    Message Edited by Waynester on 04-16-2009 04:09 PM

    So how is the printer set up?  Is it wireless or USB?  If USB you will need a cable, purchased seperately.  It is a standard A/B USB cable widely available inexpensively.  (The $1 cables form the dollar store work fine....
    Running the diagnostics at http://www.hp.com/go/tools may help resolve the issue.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Why does my printer automatically go to send a fax when I just want to print?

    Why does my printer automatically go to send a fax when I just want to print?
    This question was solved.
    View Solution.

    Hi pa_tom,
    In your printers folder on your computer, is the default printer set to your printer, or your printer- fax?
    If I have solved your issue, please feel free to provide kudos and make sure you mark this thread as solution provided!
    Although I work for HP, my posts and replies are my own opinion and not those of HP.

  • Why does my printe say "used supply in use" 1217nfw

    Why does my printe say "used supply in use" model m1217nfw

    Hello,
    The "Used Supply in Use" means that the printer believes the toner cartridges installed in the printer have been previously used in another printer.
    Have you recently changed the toner cartridge on this printer? Are you having issues printing?
    Remember if you find any of my post helpful or want to say thanks make sure to click the white star under my name to give me Kudos.
    I really appreciate it!
    You should be able to still print without problems even though the message comes up.
    THX

  • Why does my printe say "used supply in use/:

    why does my printer say used supply in use?  And I can't print anything

    Pretty sure its to make sure you don't get good use out of your cartridges... basically this company trying to get 10 cents a print out of you
    After 1100 prints, regardless of how much ink used, if you take it out (the genuine 85a) at this point and put it back in, say after a jam or you want to shake it, it tells you have a used cartridge, i have tested continually using this, and got 500 more prints, with an annoying nag that you cant stop from every page printed. you have to take it out because this printer is notorious for a section ink don't get too, even though there probably is over 50% of ink left in it.. you take it out and shake it and can print, hundreds and hundreds of more pages... but after the 1100 point mark, since the printer tracks statistics it goes into this "used mode" so averages of prints won't go up... im pretty sure its devious code... but what do i know.. i just wont be getting new HP printers.. they claim it can cause damage.... the heads are on the toner cartridge... if its damaged the cartridge is replaced and thats that... so their warnigs are smoke and mirrors..

  • Why does my printer say "offline" sometimes and won't print?

    Why does my printer say "offline" sometimes and won't print?

    Hi - Try following the steps in this document.  It should help resolve the issue.
    Hope that helps.
    Say Thanks by clicking the Kudos thumbs up. Please mark the post that solves your problem as an Accepted Solution so other forum users can utilize the solution.
    I am an HP employee.

  • Why does the printer suddenly not recognise the computer

    why does the printer suddenly not recognise the computer

    salkenward
    Welcome to the HP Community Forum.
    This issue is frequently caused by a driver malfunction although the problem could be just about anything.
    You didn't provide any information.
    The good news:  You can still help yourself and there is lots of help available, including -- in many cases -- the printer software for your computer so you can reinstall and be on your way again.
    Install Full Feature Software – Printer
    Take a look at the helpful videos if you need help with the installation.
    Take a look, too, at the Troubleshooting / How-to / Solve a problem sections for more help on just about everything "printer".
    There is a new "Print Doctor" in town for many printer models.  If there is a new print Doctor program for your model, it will be in your printer software webpages under Utilities or Diagnostics.
    Click the Kudos Thumbs-Up to show you appreciate the help and time from our Experts.
    Although I strive to reflect HP's best practices, I do not work for HP. 
    Click Accept as Solution when the Answer is a good Fix or Workaround!
    Kind Regards,
    Dragon-Fur

  • I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great

    I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great!

    The fact that you can receive means you have a valid e mail address, and have established the connection to the incoming server, so all of that works.  Since the send does not work, that means your outgoing server is rejecting whatever settings you used formthe outgoing set up.  Try them again. 
    Google your particular isp, and ipad and many times you will find the exact settings needed for your isp.  Or tell us here, and soneone else may be on the same isp.  Some mail services need you to change a port, or have a unique name for the outgoing server.  
    Kep trying.

  • HT201209 iTunes will not use the redeemed gift cards on my account, I have a $30 credit and when I try to purchase a song it goes right to my credit card on file. Why does this keep happening

    iTunes will not use the redeemed gift cards on my account, I have a $30 credit and when I try to purchase a song it goes right to my credit card on file. Why does this keep happening???

    Any time you've changed anything in your billing, it does this once to very things.

  • TS4062 when i sync my iphone a large portion of my music does not download but rather stays in the cloud. then i must download it from the cloud. why does this happen and how can i stop it from happening

    every time that i sync my iphone with a cord to my imac some large portion of my music is placed in the cloud so that i must down load it from the cloud. this includes music that i have purchased on itunes and other music. it seems random.
    why does this happen? is it a setting? i want to stop it. and music that w

    It was gift back in September. You can follow the instructions in the link below to remove them:
    Remove iTunes gift album "Songs of Innocence" from your iTunes music library and purchases - Apple Support

  • Why does ical print out starting tuesday?

    Why does ical print out staring the week on tuesday?
    Maybe the week starts one day later for the Yosemite dev team, but certainly not in my neck of the woods.
    The actual print out also looks nothing like the new matt and  'flat' graphic style of Yosemite.
    I suggest you start on monday next week and sort these issues out.
    Sunny

    For many people that is the correct option. If you think it should be different, tell Apple, as they aren't listening here.

  • My iphone is suddenly populated by random songs I've downloaded in the past. Why does this happen, and what are apple doing about fixing this?

    Why does this happen?
    What do other people do? (I can't go to sleep knowing there's a rogue album or song in my music. It's 2am now)
    What do we tell apple so that they actually fix it. None of us want to pay £25 to have our own music.

    I am on the monthly payment plan because nobody at BT has told me there is any alternative!
    Each year there I have a long, in-depth conversation with the person who sets up the contract for the next year but the gist of the thing is 'I'm  not going to be paying more than [x amount] per month, am I? Because I can't afford any more'' and each year the person says that no, in fact I should be paying less... and then without notice and even with the bill saying 'We will continue to take....' a totally different - and higher - sum disappears from my bank account.
    Then I go through the painful process of writing to complain about this, get some sort of sum refunded and then the payments go through at the level they should, with me paying any additional (usually small) amounts for usage over the allowance. Until contract end when we start all over again...
    Even if the amount they seem to randomly decide on is based on some sort of forecast, this should not be happening as I am doing what they instruct me to do on the bill to keep my payments the same.
    So something is going wrong, on many levels.
    At no point have I been offered the sort of 'monthly billing' described here; maybe there is some reason I am not allowed it. Unfortunately 'whole bill' direct debit payment is beyond me. I really need to know what I will be paying each month and I need BT to correctly take that amount, as agreed, each month, from the get-go.
    It shouldn't be that hard really! Does anyone from BT read these forums? Can somebody take this on and finally get this straight, please?

  • Why does this message keep appearing when i try to instal windows 7 through bootcamp? - "something went wrong and the USB cannot be configured for the installation"

    Why does this message keep appearing when Itry to instal windows 7 through bootcamp? - "Your bootable USB drive could not be created. An error occurred while copying the Windows installation files."

    Found a solution!
    Follow the extended version of these directions here:
    https://discussions.apple.com/docs/DOC-3581
    Worked like a charm!

  • HT2500 I sometimes get e-mails where the sender sends me several PDF's attachments. These attachments appear already opened on the e-mail unlike most PDF's which I open by clicking on the PDF icon. Why does this happen?

    I sometimes get e-mails with pdf attachments. However instead of opening a PDF icon the body of the e-mail message has the PDF's already opened. Why does this happen? Is there anything I can change on my mac book pro to make these PDF's come thru with their individual icons which can then be opened.

    This is a long-standing design flaw in Apple Mail.
    Prior to Mavericks, this command in Terminal would stop the annoying behavior:
    defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes
    This Terminal command stopped working in Mail 7.1 under Mavericks. I have reported this to Apple as both a feature request and a bug. You should too.
    http://www.apple.com/feeback

  • HT2470 Why does this not explain how to change the sort order?

    Why does this (i.e. support at Apple.com) not explain how to change the sort order? I can "arrange" by Date Modified for example but it won't let me switch to use most recent dates first. Also, what is Apple-speak for arrange versus sort anyway? It seems I used to be able to click on a column heading in finder and get a drop down arrow allowing me to change the sort sequence.

    Arrange roughly translates to "group the items in the folder." Sort is how each group is ordered. If you have arrange set to none, you can sort by anything. However, there is no way in the Arrange/Sort menu to choose the direction. The only way to do that is in the List View, and you must have Arrangement set to None.
    I've submitted an Enhancement Request to allow choosing sort direction from the Arrange/Sort menu, but I haven't ever gotten a response, which is good and bad. Good because they will often respond that they have considered it and don't plan on implementing. Bad in that they've haven't implemented it.

Maybe you are looking for

  • Configuring external Seagate drive so that I can use Time Machine on two separate machines

    I am using both an iMac and a Laptop (Macbook Pro) and wish to use Time Machine to back up both machines. However, in my ignorance it seems not to recognise which machine it backs up and thus overwrites itself from the 'other' machine. Can I do this

  • Does iMovie support swf files?

    Are the files drag and drop? Thanks

  • Error in work flow wait for change event

    Error in work flow wait for change event of business object bus1014, Actually this business object is triggering for two transaction one is me21n and another is c201 . am trying to create fork with two branches one is create and another if change occ

  • Confiuration Manager not starting in New ICM istallation

    Hi recently i have done a ICM istallation as a Progger in a single server The version is 8.5.3 After competing teh installation and initializing teh database i amm trying to launch the configuration Manager . But this is giving error. I am attaching

  • Duplicate Items in Calendar

    Any idea how to remove multiple items in Calendar?  My older version of Palm Desktop had a way to remove deplicate calendar items.  Is there a way in the most recent version? Thank you in advance for whatever help you can offer. Post relates to: Cent