Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package t3;
- import java.util.*;
- public class Zadacha {
- public static void main(String[] args) {
- ArrayList<String> phrase=new ArrayList<>(Arrays.asList("Продуктът е отличен.", "Това е страхотен продукт.", "Постоянно ползвам този продукт.", "Това е най-добрият продукт от тази категория."));
- ArrayList<String> happen=new ArrayList<>(Arrays.asList("Вече се чувствам добре.", "Успях да се променя.", "Той направи чудо.", "Не мога да повярвам, но вече се чувствам страхотно.", "Опитайте и вие. Аз съм много доволна."));
- ArrayList<String> fName=new ArrayList<>(Arrays.asList("Диана", "Петя", "Стела", "Елена", "Катя"));
- ArrayList<String> lName=new ArrayList<>(Arrays.asList("Иванова", "Петрова", "Кирова"));
- ArrayList<String> city=new ArrayList<>(Arrays.asList("София", "Пловдив", "Варна", "Русе", "Бургас"));
- Random rand=new Random();
- int randomPhrase=rand.nextInt(phrase.size());
- int randomHappen=rand.nextInt(happen.size());
- int randomFName=rand.nextInt(fName.size());
- int randomLName=rand.nextInt(lName.size());
- int randomCity=rand.nextInt(city.size());
- System.out.println(phrase.get(randomPhrase)+" "+happen.get(randomHappen)+" "+fName.get(randomFName)+" "+lName.get(randomLName)+", "+city.get(randomCity));
- }
- }
Add Comment
Please, Sign In to add comment