File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes arrays heirarchi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "arrays heirarchi" Watch "arrays heirarchi" New topic
Author

arrays heirarchi

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
sorry that I am asking this question 3rd time .
sombody has mentioned this in previous post :
reference variable's array extends from Object[] & it extends from Object .
Object
^
Object[]
^
String[]

------------------------------
String s[] = new String[2];

In my opinion , s is extending from Object class itself , not from Object[] ...

please solve my doubt ...
Thanks .
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
String[] s extends Object[] extends Object


Mike Gershman
SCJP 1.4, SCWCD in process
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
why it is like this ?
thanks .
Jay Pawar
Ranch Hand

Joined: Aug 27, 2004
Posts: 411
Rathi,
You can perform simple litmus test to verify this


Hope that helps


Cheers,<br />Jay<br /> <br />(SCJP 1.4)<br />Heights of great men were not achieved in one day, they were toiling day and night while their companions slept.
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982

In my opinion , s is extending from Object class itself , not from Object[]

Trying not to using your own opinion on doubtful issues. The best way to verify, as Jay said, is to write the code and test it.

As other said, SCJP Tiger requires lots of coding practices.

Nick


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
 
 
subject: arrays heirarchi