Click here to Skip to main content
15,913,587 members

Comments by Morgan Modise (Top 1 by date)

Morgan Modise 23-Nov-21 6:15am View    
I want to set a limit on integers from array that have to be placed in a textbox when pressing a button....I'm using JDK
Here's my code

Import java.util.Random;
Import java.util.Collections;
Import java.util.ArrayList;
Import java.util.Arrays;

List<integer>numbers = Arrays.asList( 1.2.3.4.5.6.7.8.9.10.11.12.25.35.40 );

Collections.shuffle(numbers,new Random ( System.nanoTime()));
and.settext(String.valueOf(numbers));