class Nines {
    public static void main(String[] arguments) {
        for (int dex = 1; dex <= 200; dex++) {
            int multiple = 9 * dex;
            System.out.print(multiple + " ");
        }
    }
}

no, actually it works fine. i cant send private messages for myself anymore and i just really dont know why, so i have to post it to have this kind of style of coding and printscreen it for our project. sorry for the inconvenience.... =(

int points = 0;
int target = 100;
targetLoop:
while (target <= 100) {
    for (int i = 0; i < target; i++) {
        if (points > 50)
            break targetLoop;
        points = points + i;
    }
}
int i, j;
for (i = 0, j = 0; i * j < 1000; j += 2) {
    System.out.println(i + " * " + j + " = " + (i * j));
}

well ... there's this new kind of invention that can help you out there. it's called e-mail. have you guys tried that?

import java.util.*;

class Benchmark {
    public static void main(String[] args) {
        Calendar start = Calendar.getInstance();
        int startMinute =start.get(Calendar.MINUTE);
        int startSecond = start.get(Calendar.SECOND);
        start.roll(Calendar.MINUTE, true);
        int nextMinute = start.get(Calendar.MINUTE);
        int nextSecond = start.get(Calendar.SECOND);
        int index = 0;
        while (true) {
            double x = Math.sqrt(index);
            GregorianCalendar now = new GregorianCalendar();
            if (now.get(Calendar.MINUTE) >=nextMinute) {
                if (now.get(Calendar.SECOND) >= nextSecond) {
                    break;
                }
            }
            index++;
        }
        System.out.println(index + * loops in one minute.*);
    }
}

Rather than sharing the code this way, which has some serious disadvantages (no versioning, having to manually cut and paste the code into place, risking overwriting the good code with the older code, etc.), I would suggest finding a source repository such as SourceForge or GitHub and share your code through that. The advantages are multiple, as you'd be able to easily track what changes were made when, and by whom; have multipled separate lines of development for testing purposes; be able to merge changes from several different people; and so forth. Believe me, once you've worked with a decent distributed version control system, you won't want to do any project without it.

Of course, this assumes an open-source project; but then again, you'd hardly be posting your code here if it weren't, would you? Even if it is meant to be closed-source, most source control sites allow you to set up a private, members' only repo, though it usually costs money.

Edited 4 Years Ago by Schol-R-LEA

i have to post it to have this kind of style of coding and printscreen it for our project

So you are just posting to this topic so you can get your code nicely formatted for your own use? You have no need for anyone's participation, nor do you have anything to contribute to the community? Please clarify

Rather than sharing the code this way, which has some serious disadvantages (no versioning, having to manually cut and paste the code into place, risking overwriting the good code with the older code, etc.), I would suggest finding a source repository such as SourceForge or GitHub and share your code through that. The advantages are multiple, as you'd be able to easily track what changes were made when, and by whom; have multipled separate lines of development for testing purposes; be able to merge changes from several different people; and so forth. Believe me, once you've worked with a decent distributed version control system, you won't want to do any project without it.

Of course, this assumes an open-source project; but then again, you'd hardly be posting your code here if it weren't, would you? Even if it is meant to be closed-source, most source control sites allow you to set up a private, members' only repo, though it usually costs money.

Well thank you Schol-R-LEA for the advice and for your kindness.. and for the others, sorry. didnt intend to disturb you..

So you are just posting to this topic so you can get your code nicely formatted for your own use? You have no need for anyone's participation, nor do you have anything to contribute to the community? Please clarify

Can't you see under my name that I'm a newbie poster and that i have just joined last night August 7, 2012? How can I clarify to you that i don't need anyone's participation, nor anything that i can contribute to this community? Can you please tell me? And if you are a "posting genuis", then why do you have to post a sarcastic comment rather than advising or just SIMPLY ignoring it if you find this article nonsense?

OK, calm down. I saw that you were a newbie. You misunderstood my post. It was not sarcastic. Nor did I find your post nonsense. I just wanted to know if you were really using this thread as a code formatter or if there was more to it than that - eg that you wanted help with the code you were posting or that you were posting it to help others.
ps The "Posting Genius" tag is something generated automatically by the system based on one's posting history - it's not my choice.

Edited 4 Years Ago by JamesCherrill

i cant send private messages for myself anymore and i just really dont know why,

We had a lot of problems with Private Message spam recently, so we now require I think it's 10 posts before you can have full PM access. You're almost there :)

We had a lot of problems with Private Message spam recently, so we now require I think it's 10 posts before you can have full PM access. You're almost there :)

hehehe.. thank you Dani! :)

System.out.print("She");
System.out.print("never");
System.out.print("said");
System.out.print("another");
System.out.println("word.");
int length = 121;
char rating = 'R';
System.out.prinln("Running time: " + length + " minutes");
System.out.println("Rated" + rating);
String searchKeywords = "";
searchKeywords = searchKeywords + "drama";
searchKeywords = searchKeywords + "romance";
searchKeywords = searchKeywords + "New Zealand";
String searchKeywords = "";
searchKeywords += "drama";
searchKeywords += "romance";
searchKeywords += "New Zealand";
String favorite = "piano";
string guess = "ukelele"
System.out.println("Is Ada's favorite instrument a " + guess + "?");
System.out.println("Answer: " + favorite.equals(guess));
String cinematographer = "Stuart Dryburgh";
int nameLength = cinematographer.length();
class Credits {
    public static void main(String[] args) {
        // set up film information
        String title = "The Piano";
        int year = 1993;
        String director = "Jane Campion";
        String role1 ="Ada";
        String actor1 = "Holly Hunter";
        String role2 = "Baines";
        String actor2 = "Harvey Keitel";
        String role3 = "Stewart";
        String role3 = "Sam Neil";
        String role4 = "Flora";
        String actor4 = "Anna Paquin";
        // display information
        Sysem.out.println(title + " (" + year + "       )\n" +
        "A " + director + " film.\n\n" +
        role1 + "\t" + actor1 + "\n" +
        role2 + "\t" + actor2 + "\n" +
        role3 + "\t" + actor3 + "\n" +
        role4 + "\t" + actor4);

    }
}

WORKSHOP
public class Modem {
    int speed;

    public void displaySpeed () {
        System.out.println("Speed: " + speed);
    }
}
This question has already been answered. Start a new discussion instead.