سؤال

Is it correct that there are predefined Class object representing all the 8 primitive types and void??

please tell whether I am correct or wrong?

هل كانت مفيدة؟

المحلول

Yes it's true: there are int.class, short.class, etc, which are also given by Integer.TYPE, Short.TYPE, etc respectively. Even void.class.

Not, contrary to some other answers, to be confused with the wrapper classes Integer, Short, ... themselves.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top