gpt4 book ai didi

java - 什么是 java.lang.Class[]

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:53:15 26 4
gpt4 key购买 nike

什么是 java.lang.Class<?>[]在 java 。具体是什么<?> .

我是java初学者,我不明白<?>是什么意思

谢谢,

普尼特

最佳答案

A type argument for a parameterized type is not limited to a concrete class or interface. Java allows the use of type wildcards to serve as type arguments for parameterized types. Wildcards are type arguments in the form "?", possibly with an upper or lower bound. Given that the exact type represented by a wildcard is unknown, restrictions are placed on the type of methods that may be called on object of the parameterized type.

来源: Generics In Java
还: Wildcards in Generics

关于java - 什么是 java.lang.Class<?>[],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11465277/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com