Created
October 20, 2017 14:37
-
-
Save hugotai101/2340f038c17881edee657573cb52da08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PhraseOMatic3 { | |
public static void main(String[] args) { | |
String[] girls = {"Amanda", "Jessica", "Chrissie"}; | |
String[] verbs = {"loves", "hates"}; | |
String[] boys = {"Andy", "Aaron", "Eason", "Jacky"}; | |
for (String girl : girls) { // for each string in girls[] | |
int j = (int) (Math.random() * verbs.length); | |
int k = (int) (Math.random() * boys.length); | |
System.out.println(girl + " " + verbs[j] + " " + boys[k]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment