Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is Component[ ] ?

Status
Not open for further replies.

prosper

Programmer
Sep 4, 2001
631
HK
I find the following code
import java.awt.*;
class q99{
public static void main(
String args[]){
try{
Button[] var = null;
System.out.println(
var instanceof Component[]);
}catch(Exception e){
System.out.println(
"Exception Thrown");
}//end catch
}//end main()
}//end class definition
Where can I find the document or specification about it
Thanks!
 
I don't know where you can find the doc but
var instanceOf Component[] is checking to see if
var[] is of type of Component[]. If not an unchecked
runtime error "illegalTypeCasr" I believe will be
raised.

instanceOf is a good check to make sure all the objects fall under the same class hierarchy. So read on instanceOf.



~za~
You can't bring back a dead thread!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top