Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    need some help with my code.. thanks a lot!

    If I wanted to create a program that looped a certain amount of time, would I do something like

    PHP Code:
    public class insertionAn
    {  
       
    String size "*****";

       for(
    int vagina 0vagina <= size.length(); vagina++)
    {

       
    System.out.println("What would you like for Christmas little one?");
    }

    //end program

    because I cant seem to get this to work

  • #2
    Regular Coder Aradon's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    734
    Thanks
    0
    Thanked 20 Times in 19 Posts
    Quote Originally Posted by hamsterCage View Post
    If I wanted to create a program that looped a certain amount of time, would I do something like

    PHP Code:
    public class insertionAn
    {  
       
    String size "*****";

       for(
    int i 0<= size.length(); i++)
    {

       
    System.out.println("What would you like for Christmas little one?");
    }

    //end program

    because I cant seem to get this to work
    First off, might I suggest using better variable names then the ones you are using. I've fixed it in my post.

    Secondly, whenever you create a java program, if you want something to run you have to create a main class. That is a
    Code:
    public class insertionAn
    {
      public static void main(String args[])
      {
    
      }
    }
    Place your code in the method main and then compile the program and run it. It should run fine.

    Since you are new to Java I'd like to suggest that you go read up on Java at the sun website. They have a nice tutorial there which should be enjoyable.

    Tutorial Link
    "To iterate is human, to recurse divine." -L. Peter Deutsch


  •  

    Posting Permissions

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