Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 90d8f99

Browse files
lambda printing
1 parent a3a3483 commit 90d8f99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/ArraysAndStrings/Deck.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public void shuffleDeck() {
4444

4545
//print deck
4646
public void printDeck() {
47-
for (inti =0; i< numOfCards; i++)
48-
System.out.println(DECK[i]);
47+
Arrays.stream(DECK)
48+
.forEach(card -> System.out.println(card));
4949
}
5050

5151
public static void main(String[] args) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /