I need how to Display Random number in JLabel Java I used
Random sum1 = new Random();
jLabel1.setText(random1);
I need how to Display Random number in JLabel Java I used
Random sum1 = new Random();
jLabel1.setText(random1);
Copyright © 2021 Jogjafile Inc.
Random
is a class used to generate random numbers - you need to use it by calling one of itsnextWhatever
methods: