jeudi 24 mai 2018

Java random returning strange output

I belive its a trivial question, all i just have to is to make proper question, but Iam emptyminded now so: What Iam doing wrong. I try to get some random numbers - but all I get is something like this: java.util.Random@677327b6

import java.util.Random;

public class counter {

public static void main(String args[]) {
    Random random = new Random();
    int r = random.nextInt();
    System.out.println(random.toString());
}




Aucun commentaire:

Enregistrer un commentaire