Where is the member class?
Hi,
I am Ryan.
Here is a small piece of code.
<pre>
if( error.getClass().equals( SoftErrorException.<b>class</b> ) )
{
throw new JspException();
}
</pre>
Can somebody tell me where is the member "class" referred in the object SoftErrorException. I checked in the class "Object" and "Class". I also checked in the Java documentation index. I still could not find it.
Thanks in advance
Ryan
> Can somebody tell me where is the member "class"
> referred in the object SoftErrorException. I checked
> in the class "Object" and "Class". I also checked in
> the Java documentation index. I still could not find
> it.
>
> Thanks in advance
>
> Ryan
class is not a member. This is part of the language. Also, SoftErrorException is not an Object it is a class. I'm also having a problem finding the documentation for this. I assume it is part of the JLS. ClassName.class is the same as InstanceOfClass.getClass().
> class is not a member. This is part of the language.
> Also, SoftErrorException is not an Object it is a
> class. I'm also having a problem finding the
> documentation for this. I assume it is part of the
> JLS.
For 'class'? It is in JLS 15.8.2.
http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#251530