I need a variable to stick. Permenantly.
Sorry If this post looks like another that may have or may not have gone through. I don't know whether the other one posted. N-e-wayz, I need a variable to permanantly stay incremented after I run the program. Why ? Becuase I need to run through some strings one at a time. Thanks in advance.
package ProjBeta1;
public class Main {
public static void main(String[] args) {
int rnumber = x;
String[] JoJok1={"Joe moma's so giant she walked outside with an x-files shirt on and a helicopter landed on her.",
"Joe momma's so fat she turned around on her birthday and it was her next birthday.",
"Joe momma's so massive she has her own gravitational pull and has now replaced pluto as the nineth planet.",
"Joe momma's so poor she doesn't fly southwest airlines she flies via UPS first class (in the cargo bay)",
"Joe momma's so huge she doesn't have cornrows, she has crop circles",
"Joe momma's so big she did a backflip on the trampoline and kicked Jesus in the face",
"Joe momma's so ugly she walked by you with a muddy pig in her arms and you asked her where she got it and it said, I got her at an auction house!"
};
System.out.println(" " + JoJok1[rnumber] + " ");
x = x + 1;
if(x == 6) {
x = 0;
}
}
}
This is what I have so far. It's not very impressive in any way shape or form I know. However I could really use some help.
it's said of Smokin' Joe Frazier, then when he hit someone, they stayed hit.
You, on the other hand need to use some kind of persistence.
I have no idea what it is you want.
Are you saying I haven't been trying for the past 3 and a half hours trying to get one measly problem solved three differen't ways, and this way looks the most plausible ?
She so po' she can't afford to have an opinion.
I want to get a variable to stay when I run this code. This way I only print one string at a time...
Uggghhhh I think I'm just retarded... I can't get my message across!
Rather than do that, why not randomly choose one of the strings and print that?
With enough strings, it's unlikely you will print the same one twice in a row.
> Are you saying I haven't been trying for the past 3
> and a half hours trying to get one measly problem
> solved three differen't ways, and this way looks the
> most plausible ?
Do you want to solve your problem? Then explain what it is you're trying to do instead of going into defense.
Because If I use the random class then I will not be able to port it to phones.
I made the whole program work perfectly but it wouldn't port to phones because of the random class and the fact that it wasn't in there.
Oh yeah, and what I said earlier was not to you promiethuzz I was annoyed by the first person who spoke and typed too slow.
> Because If I use the random class then I will not be
> able to port it to phones.
Really? If need be, you can google and find pseudo-random number generator code in less time than it takes to say a "yo' momma" joke.
Oh wow. Wish I had known that earlier, how does that work ?
> Oh wow. Wish I had known that earlier, how does that work ?
What, Google?
No adding thier random generator to my program. Oh and I can't find one can you give me an exact site ?
> Oh yeah, and what I said earlier was not to you
> promiethuzz I was annoyed by the first person who
> spoke and typed too slow.
I knew that, but my reply still stands.
Anyway, if you're looking for a (pseudo) random number generator, search the web for "Linear Congruential Method", which will result in many useful documentation how to implement your own (pseudo) random number generator.
Post back if you have specific questions about your implementation.
The Mersenne Twister is quite good:
http://en.wikipedia.org/wiki/Mersenne_twister
> The Mersenne Twister is quite good
I thought that was a party game played at the French court in the 17th century.
> > The Mersenne Twister is quite good
>
> I thought that was a party game played at the French
> court in the 17th century.
A hooker once said she'd give me a Mersenne Twister for $100.
> ...
> A hooker once said she'd give me a Mersenne Twister
> for $100.
That's a bit too much for a hooker from the 17th century!
> > ...
> > A hooker once said she'd give me a Mersenne
> Twister
> > for $100.
>
> That's a bit too much for a hooker from the 17th
> century!
Oh, I was converting from florins and taking inflation into account.
> Oh, I was converting from florins and taking
> inflation into account.
Ah, I see.
> > Oh, I was converting from florins and taking
> > inflation into account.
>
> Ah, I see.
Not that I took her up on it. I've never paid for a piece of *** in my life. And she offered to take her false teeth out first, too.
> > That's a bit too much for a hooker from the 17th
> > century!
>
> Oh, I was converting from florins and taking
> inflation into account.
So that's, let's see... 1.87 German florins. Or was that the Italian florin you meant?
> Not that I took her up on it. I've never paid for a
> piece of *** in my life. And she offered to take her
> false teeth out first, too.
Lemme guess: you were running late for diner, right?
Ahem. I think we all need to get back to work.