...

View Full Version : need some help with my code.. thanks a lot!



hamsterCage
12-08-2007, 02:35 AM
If I wanted to create a program that looped a certain amount of time, would I do something like


public class insertionAn
{
String size = "*****";

for(int vagina = 0; vagina <= 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

Aradon
12-08-2007, 10:26 PM
If I wanted to create a program that looped a certain amount of time, would I do something like


public class insertionAn
{
String size = "*****";

for(int i = 0; i <= 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


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 (http://java.sun.com/docs/books/tutorial/)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum