How To Generate Random Names in Java

preview_player
Показать описание
Simple Java tutorial how to generate random names and values in Java ..
Рекомендации по теме
Комментарии
Автор

Finally, I got this video. Thank you so much.

antoniokhan
Автор

Exactly what I was searching for :) Thank you

davelake
Автор

dude cant explain how much you helped me

vivansheth
Автор

Thank you dude, you're a damn legend

waltermymala
Автор

respect sir am so greatful for your videos

botshelorapodile
Автор

Many Thanks, you made my code

import java.util.Random;

public class Tutorials {

public static void main(String[] args) {
String[] test = new String [3];
test[0]= "go";
test[1] = "stop";
test [2] = "slow";
System.out.println(test [new Random ().nextInt(test.length)]);

}

}

ZeParagon
Автор

thankyou so much. Finally, that is so helpful

wahyuuuu
Автор

Thank you very much! May God bless you!

erikasong
Автор

how can i get these names in text fields after running the program?

hrithikpandey
Автор

How do I make it so that the name I've randomly generated does not repeat/come up again?

MiguelRodriguez-coes
Автор

Write a program which must have 10 countries names saved in an Array.
When the program executes, it should guess a random number within the range of 10 and print the
nth element of the Array as with the same number of characters as the element is:
Like:
We have an array which contains (Pakistan, India, Australia, Bangladesh, America, Turkey, China,
Iran, Iraq, Kuwait)
Now, If the program guesses 3 which is (Australia) then it should print
Then it should ask the user to guess the character.
If user enters ‘a’ then it should replace the ‘a’ in guessed word. Like A****a**a
Now if the user enters ‘l’, it should be like:
A****al*a
But if the user enters the wrong character then it should print.
“Wrong Character, Try Again”
At last if the user fail in 3 tries, the program should end otherwise print the result

saqibqureshi