type of types in Java
c#, java, primitive-types, types
Solution
Yes, these are available through their wrapper's `TYPE` fields:
Class[] types = new Class[] {Integer.TYPE, Byte.TYPE, ...};
You can also use `int.class` syntax, which has not been available in earlier versions of the language:
Class[] types = new Class[] {int.class, byte.class, ...}; // Lowercase is important
Problem
At the risk of asking a question that has already been asked but is there a counterpart in Java for the `Type` type available in C# ? What I want to do is filling an array with elements which reflect several primitive types such as int, byte etc. In C# it would be the following code: ``` Type[] types = new Type[] { typeof(int), typeof(byte), typeof(short) }; ```