Phone number generator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Phone number generator

Trying to create a mobile phone number generator, saw that on has already been created but I'm trying to do one that starts with 07 or +44 just to give it a bit more of an authentic look, was hoping someone could help out with the line of code I need

26th Sep 2016, 9:11 PM
Alexander Evans
Alexander Evans - avatar
4 Answers
+ 2
Thanks mate
27th Sep 2016, 7:32 AM
Alexander Evans
Alexander Evans - avatar
+ 1
First import Random. Then you want to generate your random number :D Random r = new Random(); int r = r.nextInt(999999999); System.out.println(r);
27th Sep 2016, 5:47 AM
MM1132
MM1132 - avatar
+ 1
It welcome :D
27th Sep 2016, 8:03 AM
MM1132
MM1132 - avatar
0
I need franch phone number
8th Aug 2022, 9:20 AM
Kingsley Ikeson
Kingsley Ikeson - avatar