Skip to content

Commit b78d2f8

Browse files
authored
Merge pull request #2330 from czasoprzestrzenny/patch-1
2 parents 705ae51 + dcc5159 commit b78d2f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_tour/generic-classes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ To use a generic class, put the type in the square brackets in place of `A`.
3838
val stack = new Stack[Int]
3939
stack.push(1)
4040
stack.push(2)
41-
println(stack.pop) // prints 2
42-
println(stack.pop) // prints 1
41+
println(stack.pop()) // prints 2
42+
println(stack.pop()) // prints 1
4343
```
4444
The instance `stack` can only take Ints. However, if the type argument had subtypes, those could be passed in:
4545
```

0 commit comments

Comments
 (0)