Joke Collection Website - Blessing messages - JAVA program, randomly generate a 6-bit verification code (from 0
JAVA program, randomly generate a 6-bit verification code (from 0
Import java.util.random;
Public class TestRandom {
Common string getRandStr(int charCount) {
String charValue =
for(int I = 0; I & ltcharCounti++){
char c =(char)(random nt(0,26)+' a ');
char value+= string . value of(c);
}
Return charValue
}
Common string getRandNum(int charCount) {
String charValue =
for(int I = 0; I & ltcharCounti++){
char c =(char)(random nt(0, 10)+' 0 ');
char value+= string . value of(c);
}
Return charValue
}
public int randomInt(int from,int to){
Random r = new Random();
return from+r . nextint(to-from);
}
}
- Previous article:Touring games always send verification codes.
- Next article:Message from May 4th Youth Day and Senior People's Day
- Related articles
- What websites that download mobile games have been cracked?
- My girlfriend likes to sleep in the morning. I wake her up every day, but I'm afraid it will be too monotonous after a long time. I want to ask, is there any way to be more innovative?
- The mobile phone can't receive any short messages. Is the mobile phone card broken?
- How to hide short message content in vivo mobile phone
- After the blind date, if you think the woman is good, how can you send a message to the girl saying what you think and ask her what attitude?
- How do mobile users unsubscribe from MMS service via SMS?
- Recently, I received a short message saying that I can get consumption points by taking the flight of China Eastern Airlines. Maybe my mobile phone was stolen and registered. How to cancel the mobile
- Can I get a refund if I cancel the postal deduction in 30 yuan?
- How to say warm words after divorce?
- Red envelope humorous reply