Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TextView textView1 = (TextView) findViewById(R.id.textview1);
- TextView textView2 = (TextView) findViewById(R.id.textview2);
- TextView textView3 = (TextView) findViewById(R.id.textview3);
- TextView textView4 = (TextView) findViewById(R.id.textview4);
- Set<Integer> randomNumbers1 = new HashSet<>();
- while (randomNumbers1.size() < 15) {
- randomNumbers1.add(new Random().nextInt(26));
- }
- Set<Integer> randomNumbers2 = new HashSet<>();
- while (randomNumbers2.size() < 15) {
- randomNumbers2.add(new Random().nextInt(26));
- }
- Set<Integer> randomNumbers3 = new HashSet<>();
- while (randomNumbers3.size() < 15) {
- randomNumbers3.add(new Random().nextInt(26));
- }
- Set<Integer> randomNumbers4 = new HashSet<>();
- while (randomNumbers4.size() < 15) {
- randomNumbers4.add(new Random().nextInt(26));
- }
- textView1.setText(TextUtils.join(", ", randomNumbers1));
- textView2.setText(TextUtils.join(", ", randomNumbers2));
- textView3.setText(TextUtils.join(", ", randomNumbers3));
- textView4.setText(TextUtils.join(", ", randomNumbers4));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement