Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これら2つの違いは何ですか?プリミティブ型は「クラス」を持つことはできません。それは可能です-それはプリミティブです。クラスを持つオブジェクトはありません。
これら2つはどこで違いを生むのでしょうか?
私はあなたが何を意味するのか肯定的ではありませんが、-Classオブジェクトは型の実行時の代表です。とはいえ、クラスではありませんが、int.classとは違うものがあります。ちょっと複雑ですが、プリミティブ引数を取るメソッドやプリミティブ値を返すメソッドでもリフレクションを機能させるか、を受け入れるメソッドとを受け入れるメソッドを区別する必要があります。Integer.classintIntegerint
Class
int.class
Integer.class
int
Integer
Integer.TYPE、私は、と同等だと思いますint.class。
Integer.TYPE