-2 java
阅读密码学,无法理解为什么指示的代码行打印数据:
Provider p[] = Security.getProviders()
for (int i = 0; i < p.length; i++) {
System.out.println(p[i]); // <<<--- THIS LINE
Run Code Online (Sandbox Code Playgroud)
为什么打印数据如果它不是字符串,它是一个提供者对象
谢谢.
因为println()接受很多类型,例如这个方法有很多签名:
println(int i){...} //when you set int you call this
println(String i){...} //when you set String you call this
println(boolean i){...} //when you set boolean you call this
println(char i){...} //when you set char you call this
println(java.lang.Object i){...} //when you set Object you call this
... and so on
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
100 次 |
| 最近记录: |