Random float in Java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Random float in Java

I’m trying To mAKE A RANDOM BOOLEAN IN JAVA I TRIED TO GET A NUMBER I KEPT GETTING A DEVIMAL BUT I DONT WANT A DECIMAL

12th Feb 2021, 7:05 PM
joey
joey - avatar
4 Answers
+ 2
joey Whare is your code?
12th Feb 2021, 7:08 PM
A͢J
A͢J - avatar
+ 2
How you are trying? Post your try..
12th Feb 2021, 7:08 PM
Jayakrishna 🇮🇳
+ 1
joey It is mix of Java and JavaScript. Do you know both languages are different?
13th Feb 2021, 12:23 AM
A͢J
A͢J - avatar
0
it wouldnt let me do a picture so here it is: var x= public static int nextInt(0,11); console.log (x)
12th Feb 2021, 9:33 PM
joey
joey - avatar