Re: how do I make Class.forName("Integer") returning java.lang.Integer ?



Stefan Ram wrote:
"J. Verdrengh" <une-v@xxxxxxxxxx> writes:

"java.lang.Integer" is a Class.
A class is not a value, so it can not be returned.

Afaik each class in Java is represented by an instance of type Class,
so a class (==instance of Class) can be returned..


This, I would have written as »java.lang.Integer.class«.

Not if you were calling Class.forName. .