I feel ashamed but would someone help me with for loops?

Hello all,
Firstly, apologies. I feel ashamed. I am not new to programming but new to Java, so imagine my frustration at my blatant stupidity why I can't get this for loop to work....
public void initGame(String[] arrTemp) {
for (int i = 0; i > 4; i++) {
frmGameOptions.append("hello" + arrTemp[i] + "-" + txtBully);
basically the above method does not work!
arrTemp does contain elements, trust me!
it seems at though the loop isn't even getting entered!
please help me!!!!!!!!!!!!!!!
poncenby

i think you want
for (int i = 0; i < 4; i++)
    frGameOptions.append("hello" + arrTemp[i] + "-" txtBully);
a better way would be
for (int i =0; i < arrTemp.length; i++){
    frGameOptions.append("hello" + arrTemp[i] + "-" txtBully);
}

Similar Messages

  • Help me with for loop please...............

    hi guys i m just new bie as you know
    i gotta print these things........
    from 7 stars to 1 star........
    i did it like this but it only produce
    in this way,,,,,,
    how do we actually padding the space and print it as the example........
    help me guys whoever experts in for loops my code is........
    class triangle
         public static void main (String[] args)
              a(7);
         public static void a (int num)
              for (int j = num ; j > 0 ; j--)
                   for (int i = 0 ; i < j ; i++)
                        System.out.print("*");
                   System.out.println ();
    }

    You really need a better screen name,
    The problem is is that you want to print out a descending number of stars
    preceded by a number of spaces . the number of spaces for a line is the number of characters - number of stars so
              for (int j = num ; j > 0 ; j--)
    HERE print the required spaces!
                   for (int i = 0 ; i < j ; i++)
                        System.out.print("*");
                   System.out.println ();

  • I tried downloading the Adobe Premiere and Photoshop 13, but got error 7. Would someone help me with this?

    I have a PC and tried downloading Photoshop and premiere but weren't able to complete. I got error 7. Does this mean not compatible with my PC? It has windows 7.

    uninstall, clean (Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6) and reinstall.
    if you see an error message in english, attach a screenshot of it.

  • I have an Apple I Phone 4S which is great but, can someone help me how to get the photos and videos to my PC which runs on MS XP. I would like to be able to edit and copy to a DVD.

    I have an Apple I Phone 4S which is great but, can someone help me how to get the photos and videos to my PC which runs on MS XP. I would like to be able to edit and copy photos and videos to a DVD.

    Connect your iPhone to your computer. Tp your pc should recognize your iPhone as a camera. Use what ever application you have on the pc to transfer files from a camera to your computer.

  • I tried connecting my Ipod Touch 5th generation to the internet via ad-hoc from my windows 7 laptop. My iPod was connected to the internet but just in a moment. Then it disconnects. would someone help me?

    I tried connecting my Ipod Touch 5th generation to the internet via ad-hoc from my windows 7 laptop. My iPod was connected to the internet but just in a moment. Then it disconnects. I tried so many other option such as creating another ad-hoc from other  laptop but still the same result. Is there something wrong with my iPod? this is so frustrating. I've been using ipod touch 4th gen before I got the 5th and connecting to the internet via ad-hoc was never a problem for me.  Would someone help me? 

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • Can someone help me with an iCloud problem when I take a picture with my iPhone 4s it some of the times go to my ipad2 but mostly it doesn't can anyone help me out

    Can someone help me with an iCloud problem when I take a picture with my iPhone 4s it some of the times go to my ipad2 but mostly it doesn't can anyone help me out

    I'm assuming you have Photo Stream set up of both devices.  However, it seems many users are experiencing the same as you - my take is that streaming photos is not foolproof yet.

  • My iPad acting so weird tonight. When it shut down automatically because the battery has been drained. When I opened it, it creates some weird sounds like *swoosh* blahblah. It does make me feel nervous. Can someone help me? Does it already broken? :(

    My iPad acting so weird tonight. When it shut down automatically because the battery has been drained. When I opened it, it creates some weird sounds like *swoosh* blahblah. It does make me feel nervous. Can someone help me? Does it already broken?

    adetoye50 wrote:
    Dear Contacts Journal Support Team,
    FYI, this is a user to user support forum.  You are NOT addressing Apple here.
    Honestly, I doubt anyone is really going to take the time to read the novel you have written.

  • HI everybody i want to ask if you come me in help, i want to draw paths but when i use stroke options with pen or brush settings i loose quality when i zoom in , can someone help me with pen settings???

    HI everybody i want to ask if you come me in help, i want to draw paths but when i use stroke options with pen or brush settings i loose quality when i zoom in , can someone help me with pen settings???

    The work path is a vector object, and infinitely scalable, but when you stroke it, Photoshop lays pixels on a layer that follow the path.  These pixels are raster based and can not be scaled without loosing quality.  You do have options.  If you want to make the raster layer bigger, transform the work path and stroke it again.  Or work at a higher resolution in the first place.
    Incidentally, you can't stroke a Path with the Pen, because it is a Vector based tool, and stroking is a raster based function.

  • Hi folks, can someone help me with my redemption code? have a creative cloud id made last week. but in order to install my products I have a redemption code needed but that I can't find anywhere. can someone help me??? Thank you

    Hi folks, can someone help me with my redemption code?
    have a creative cloud id made last week.
    but in order to install my products I have a redemption code needed but that I can't find anywhere. can someone help me???
    Thank you

    I have a fully companies annual subscription of 69.99 a month.
    but I can only download the 30-day trial versions.
    and if I want to put on them completely firedamp should I enter a redemption code. could it be that the code later emailed word?
    Met vriendelijke groet,
    Dave Dros
    Van: "hans-g." <[email protected]<mailto:[email protected]>>
    Beantwoorden - Aan: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Datum: dinsdag 21 oktober 2014 10:03
    Aan: iMac <[email protected]<mailto:[email protected]>>
    Onderwerp:  Hi folks, can someone help me with my redemption code? have a creative cloud id made last week. but in order to install my products I have a redemption code needed but that I can't find anywhere. can someone help me??? Thank you
    Hi folks, can someone help me with my redemption code? have a creative cloud id made last week. but in order to install my products I have a redemption code needed but that I can't find anywhere. can someone help me??? Thank you
    created by hans-g.<https://forums.adobe.com/people/hans-g.> in Adobe Creative Cloud - View the full discussion<https://forums.adobe.com/message/6850359#6850359>

  • HT5655 I followed all the instructions to update Flash Player, but the installation fails at around 90%, it says that there is an Application running (Safari) bit I actually close all Apps. already. can someone help me with this issue ?? Thanks

    I have followed the instructions to update Flash Player, the Installation Fails at about 90%, it says that there is an Application running (Safari) and it says to close all the apps. and start again ... but I already close all the Applications ... none is running ... can someone help me with this issue ??? Thanks ...

    Dear Dominic
    Brilliant reply. Simple English. Simple to follow instructions. And it worked immediately, first time.
    Why couldn't the Apple and Adobe corporations get their programming right first time? We spend billions of UK pounds and US dollars with them. They reply with incompetent programming such as this, and arrogance to their customers in issuing faulty systems without doing the most rudimentary checks.
    Anyway, I certainly shan't be buying another Apple as this is the most unreliable, most incomprehensible, most illogical and downright thoughtless shoddy piece of computer kit which I have ever owned. And all of it is rubbish ~ emails disappear, photos can't be organised properly, spreadsheets don't work, Pages is laborious… the list goes on and on...
    But thanks to you Dominic, I have been able to load Adoble Flashj… maybe eyou should get  a job at Apple, and set them all on the right course to how to work simply and correctly with customers.
    Thanks again,
    David

  • After the OS 6 update my speaker does not work. My music plays but no sound comes out. Can someone help me with this issue? I currently have the 4S.

    After the OS 6 update my speaker does not work. Volume control on the side does not adjust the volume either. My music plays but no sound comes out. Can someone help me with this issue? I've tried rebooting my phone but still no sound comes out. I currently have the 4S.

    try to activate and desactivate the airplne switch a couple of time

  • Why is "erase junk mail" de-highlighted in the drop down menus.  I'm not able to delete my junk mail box without doing each one individually.  Simple, but please someone help with an answer.  Thanks.

    why is "erase junk mail" de-highlighted in the drop down menus.  I'm not able to delete my junk mail box without doing each one individually.  Simple, but please someone help with an answer.  Thanks.

    My daughter has had her Razr for about 9 months now.  About two weeks ago she picked up her phone in the morning on her way to school when she noticed two cracks, both starting at the camera lens. One goes completely to the bottom and the other goes sharply to the side. She has never dropped it and me and my husband went over it with a fine tooth comb. We looked under a magnifying glass and could no find any reason for the glass to crack. Not one ding, scratch or bang. Our daughter really takes good care of her stuff, but we still wanted to make sure before we sent it in for repairs. Well we did and we got a reply from Motorola with a picture of the cracks saying this was customer abuse and that it is not covered under warranty. Even though they did not find any physical damage to back it up. Well I e-mailed them back and told them I did a little research and found pages of people having the same problems. Well I did not hear from them until I received a notice from Fed Ex that they were sending the phone back. NOT FIXED!!! I went to look up why and guess what there is no case open any more for the phone. It has been wiped clean. I put in the RMA # it comes back not found, I put in the ID #, the SN# and all comes back not found. Yet a day earlier all the info was there. I know there is a lot more people like me and all of you, but they just don't want to be bothered so they pay to have it fix, just to have it do it again. Unless they have found the problem and only fixing it on a customer pay only set up. I am furious and will not be recommending this phone to anyone. And to think I was considering this phone for my next up grade! NOT!!!!

  • I download a game called warriors 3. I try to buy stuff inside, but it keeps saying your purchase could not be complete. Can someone help me with that?

    I download a game called warriors 3. I try to buy stuff inside, but it keeps saying your purchase could not be complete. Can someone help me with that?

    You will need to contact iTunes support for purchase problems: https://getsupport.apple.com/Issues.action

  • Could someone help me with instructions for doing a clean install for iMac with mountain lion 10.8.4 ?

       Could someone help me with instructions for doing a clean install for Could someone help me with instructions for doing a clean install for an early 2009 iMac 20"  with Mountain Lion 10.8.4 ?
       Thank You,
                                leetruitt

       Barney,  William,  nbar, Galt\'s Gulch:
       A nephew stayed with us to take a course at the local community college last semester. I allowed him use of my mac for research just after I installed Mountain Lion. He decided to "help out" and ran a 3rd party clean and tune up app., Magician.  The tune up wiped over 1200 titles of my music in iTunes,  also a path of folders with names containing nothing but more empty folders with names. Almost every program I open and run for a short time crashes, also folders and programs are in wrong places, or cannot be located (the nephew, for instance). Up to this time I have always been able to track a problem far enough to resolve it by careful persistence and good luck, but I do not have the tech savvy to solve this one without getting in deeper. I have run disk utility saveral times and always get  variations of this:
    ACL found but not expected on
    "private/etc/resolve.conf"
    "private/etc/raddb/sites-enabled/inner-tunnel"
    "private/etc/rabbd/sites-enabled/control-socket"
         Also, after four years of intense daily use it is cluttered with much junk,  and every app that I was curious about, and I am a very curious guy.
       So I know my limits, (and now my nephew). I dumped my pc for a Strawberry iMac a few years ago, and so far every problem I've encountered, or brought on myself, the Mac has resolved with its own inner elegance - in spite of my novice bungels - and now I honestly feel ashamed, in addition to the need to apologize to a machine for allowing a peasant into the Royal Grounds - so I am calling the Wise Ones in for this one.
       Crazy, I know, but to me a Mac represents something far beyond the ordinary  input ➛ process  ➛ output  title/function customarily assigned to a machine - I sense an odd kind of morality involved, one that I need to respect.
        So, these are my reasons for wanting to do a clean install, correctly.
            Thank you,  Truitt

  • Hi, can someone help me with my External HDD??? Please

    Hi, Can someone help me with my Extenal HDD???
    Please

    After you have all of the files from the External HDD you want to save, to format the HDD:
    Open Launchpad
    Open Utilities
    Open Disk Utility
    Select Hard Drive to format (the external HDD)
    If you want to change partition size or number select Partition Table
    Select number of partitions and adjust sizes if more than one
    Name the partitions
    Select the format from the pop-up menu (use Mac OS Extended (Journaled))
    If it is not already selected, select GUID Partition Table
    Click OK
    Click Apply
    And it should do the formatting for you.
    Note: giving a name may come after the format selection, I sometimes get that out of order but it will lead you through the process.

Maybe you are looking for

  • My artwork and images keep resizing at random how to I stop this from happening ?

    I have tried to PIN / LOCK the images but nothing is working, pulling my hair out - When I add an image to a slideshow then upload to FTP then i go online all the images are mis aligned and re sized - I have to go back and re-set them all again. done

  • How to convert dd/mm/yy in ddmmyy in java

    Can any one tell ,how to convert dd/mm/yy in ddmmyy in java

  • Changing BOM-items in Process Order not allowed

    that Hello, Mi client is asking me if it is posible, once created a Process Order, upon modifying the order (COR2), that the user can not change any of the cuantities and batches of the material list (BOM) updated in the Process Order. Is there any w

  • Have the clamshell mode requirements been relaxed?

    I'm experiencing what I consider to be some odd behaviour regarding an external display hooked up to my MacBook: With the external display being the only peripheral connected, the MacBook will enter clamshell mode when I close the lid. It was my unde

  • Dynamic Forms and PDF Preview

    I'm new to PDF forms and designer. I have encountered 2 issues that I can't get around. 1 - PDF Preview - When I go from "body pages" to "PDF Preview" it goes into a script saying it can't download from a website and errors out. I believe it worked p