0

While I was reading the java.lang.Class doc, I found the following description:

  The primitive Java types ({@code boolean},
 * {@code byte}, {@code char}, {@code short},
 * {@code int}, {@code long}, {@code float}, and
 * {@code double}), and the keyword {@code void} are also
 * represented as {@code Class} objects.

Can somebody explain, what is meant by "Primitive Java types are also represented as Class objects" ?

Jonny Henly
  • 4,023
  • 4
  • 26
  • 43
nantitv
  • 3,539
  • 4
  • 38
  • 61
  • 1
    Also http://stackoverflow.com/questions/13418202/why-do-primitive-types-have-a-class-and-how-is-it-intended-for-using and http://stackoverflow.com/questions/18271999/what-does-int-class-mean and http://stackoverflow.com/questions/13197084/what-is-the-use-purpose-of-primitive-type-classes – Tunaki May 13 '16 at 11:03
  • @JonnyHenly I think they are not referring to the Boxed class. But I am not sure – nantitv May 13 '16 at 11:20
  • @nantitv I thought it was referring to those when I first read it, but the questions Tunaki linked make much more sense. – Jonny Henly May 13 '16 at 11:25

0 Answers0