只是想知道,你会如何使用泛型类型大声读出以下项目?
1) class Box<T>
2) Box<Integer> integerBox
3) class Box<T,U>
4) <T,U> void doSomething(T t, U u)
Run Code Online (Sandbox Code Playgroud)
谢谢
Ami*_*nde 12
1) class Box<T> Box of T
2) Box<Integer> integerBox Box of Integer
3) class Box<T,U> Box of T,U
4) <T,U> void doSomething(T t, U u) Just a method which accepts two type parameters T and U
Run Code Online (Sandbox Code Playgroud)
参考文献:
| 归档时间: |
|
| 查看次数: |
286 次 |
| 最近记录: |