Skip to content

Instantly share code, notes, and snippets.

@viveknarang
Created October 17, 2017 17:11
Show Gist options
  • Save viveknarang/243d1ed3466b145ab74c75023588b922 to your computer and use it in GitHub Desktop.
Save viveknarang/243d1ed3466b145ab74c75023588b922 to your computer and use it in GitHub Desktop.
public class Sample2 {
public static void main(String[] args) {
String[] suits = {"Clubs", "Diamonds","Hearts", "Spades"};
String[] ranks = {"Ace","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Jack","Queen","King"};
System.out.println("The message\n----------");
for (int i = 0; i < suits.length; i++) {
for (int j = 0; j < ranks.length; j++){
System.out.println( ranks[j] + " of " + suits[i]);
}
System.out.println("----------");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment